/* build: 20100127-13_05 - revision: 4548 - version: 1.1 v.1.1.1 */
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(mrm.$);;(function($){$.bind=function(object,method){var args=Array.prototype.slice.call(arguments,2);if(args.length){return function(){var args2=[this].concat(args,$.makeArray(arguments));return method.apply(object,args2);};}else{return function(){var args2=[this].concat($.makeArray(arguments));return method.apply(object,args2);};}};})(mrm);;
/* Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 1.0.3
 * Requires jQuery 1.1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(mrm.$);;(function($){var selCount=-1;$.jScrollPane={active:[]};$.fn.jScrollPane=function(settings)
{settings=$.extend({},$.fn.jScrollPane.defaults,settings);var rf=function(){return false;};return this.each(function(i)
{var $this=$(this);if(settings.select){selCount++;}
$this.css('overflow','hidden');var paneEle=this;if($(this).parent().is('.jScrollPaneContainer')){var currentScrollPosition=settings.maintainPosition?$this.position().top:0;var $c=$(this).parent();var paneWidth=$c.innerWidth();var paneHeight=$c.outerHeight();var trackHeight=paneHeight;$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown',$c).remove();$this.css({'top':0});}else{var currentScrollPosition=0;this.originalPadding=$this.css('paddingTop')+' '+$this.css('paddingRight')+' '+$this.css('paddingBottom')+' '+$this.css('paddingLeft');this.originalSidePaddingTotal=(parseInt($this.css('paddingLeft'))||0)+(parseInt($this.css('paddingRight'))||0);var paneWidth=$this.innerWidth()
var paneHeight=$this.outerHeight();if(settings.maxHeight!=null&&paneHeight>settings.maxHeight){paneHeight=settings.maxHeight;}
var originalHeight=$(this).height();var borderWidth=$(this).outerWidth()-$(this).innerWidth();var trackHeight=paneHeight;if(settings.isSelect){var className="jScrollPaneContainer jScrollPaneContainerSelect";}else{var className="jScrollPaneContainer";}
var paneHeightCSS=(isNaN(paneHeight))?"auto":paneHeight+'px';var paneWidthCSS=(isNaN(paneWidth))?"auto":paneWidth+'px';var $container=$('<div></div>').attr({'className':''+className+''}).css({'height':paneHeightCSS,'width':paneWidthCSS});if(settings.enableKeyboardNavigation){$container.attr('tabindex',settings.tabIndex);}
$this.wrap($container);$(document).bind('emchange',function(e,cur,prev)
{$this.jScrollPane(settings);});}
if(settings.reinitialiseOnImageLoad){var $imagesToLoad=$.data(paneEle,'jScrollPaneImagesToLoad')||$('img',$this);var loadedImages=[];if($imagesToLoad.length){$imagesToLoad.each(function(i,val){$(this).bind('load readystatechange',function(){if($.inArray(i,loadedImages)==-1){loadedImages.push(val);$imagesToLoad=$.grep($imagesToLoad,function(n,i){return n!=val;});$.data(paneEle,'jScrollPaneImagesToLoad',$imagesToLoad);var s2=$.extend(settings,{reinitialiseOnImageLoad:false});$this.jScrollPane(s2);}}).each(function(i,val){if(this.complete||this.complete===undefined){this.src=this.src;}});});};}
var p=this.originalSidePaddingTotal;var realPaneWidth=paneWidth-settings.scrollbarWidth-settings.scrollbarMargin-p;var cssToApply={'height':'auto','width':realPaneWidth+'px'}
if(settings.scrollbarOnLeft){cssToApply.paddingLeft=settings.scrollbarMargin+settings.scrollbarWidth+'px';}else{cssToApply.paddingRight=settings.scrollbarMargin+'px';}
$this.css(cssToApply);var contentHeight=$this.outerHeight();var percentInView=paneHeight/contentHeight;if(percentInView<.99){var $container=$this.parent();$container.append($('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append($('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append($('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'}))));var $track=$('>.jScrollPaneTrack',$container);var $drag=$('>.jScrollPaneTrack .jScrollPaneDrag',$container);var currentArrowDirection;var currentArrowTimerArr=[];var currentArrowInc;var whileArrowButtonDown=function()
{if(currentArrowInc>4||currentArrowInc%4==0){positionDrag(dragPosition+currentArrowDirection*mouseWheelMultiplier);}
currentArrowInc++;};if(settings.enableKeyboardNavigation){$container.bind('keydown.jscrollpane',function(e)
{switch(e.keyCode){case 38:currentArrowDirection=-1;currentArrowInc=0;whileArrowButtonDown();currentArrowTimerArr[currentArrowTimerArr.length]=setInterval(whileArrowButtonDown,100);return false;case 40:currentArrowDirection=1;currentArrowInc=0;whileArrowButtonDown();currentArrowTimerArr[currentArrowTimerArr.length]=setInterval(whileArrowButtonDown,100);return false;case 33:case 34:return false;default:}}).bind('keyup.jscrollpane',function(e)
{if(e.keyCode==38||e.keyCode==40){for(var i=0;i<currentArrowTimerArr.length;i++){clearInterval(currentArrowTimerArr[i]);}
return false;}});}
if(settings.showArrows){var currentArrowButton;var currentArrowInterval;var onArrowMouseUp=function(event)
{$('html').unbind('mouseup',onArrowMouseUp);currentArrowButton.removeClass('jScrollActiveArrowButton');clearInterval(currentArrowInterval);};var onArrowMouseDown=function(){$('html').bind('mouseup',onArrowMouseUp);currentArrowButton.addClass('jScrollActiveArrowButton');currentArrowInc=0;whileArrowButtonDown();currentArrowInterval=setInterval(whileArrowButtonDown,100);};$container.append($('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowUp','tabindex':-1}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll up').bind('mousedown',function()
{currentArrowButton=$(this);currentArrowDirection=-1;onArrowMouseDown();this.blur();return false;}).bind('click',rf),$('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowDown','tabindex':-1}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll down').bind('mousedown',function()
{currentArrowButton=$(this);currentArrowDirection=1;onArrowMouseDown();this.blur();return false;}).bind('click',rf));var $upArrow=$('>.jScrollArrowUp',$container);var $downArrow=$('>.jScrollArrowDown',$container);if(settings.arrowSize){trackHeight=paneHeight-settings.arrowSize-settings.arrowSize;$track.css({'height':trackHeight+'px',top:settings.arrowSize+'px'})}else{var topArrowHeight=$upArrow.height();settings.arrowSize=topArrowHeight;trackHeight=paneHeight-topArrowHeight-$downArrow.height();$track.css({'height':trackHeight+'px',top:topArrowHeight+'px'})}}
var $pane=$(this).css({'position':'absolute','overflow':'visible'});var currentOffset;var maxY;var mouseWheelMultiplier;var dragPosition=0;var dragMiddle=percentInView*paneHeight/2;var getPos=function(event,c){var p=c=='X'?'Left':'Top';return event['page'+c]||(event['client'+c]+(document.documentElement['scroll'+p]||document.body['scroll'+p]))||0;};var ignoreNativeDrag=function(){return false;};var initDrag=function()
{ceaseAnimation();currentOffset=$drag.offset(false);currentOffset.top-=dragPosition;maxY=trackHeight-$drag[0].offsetHeight;mouseWheelMultiplier=2*settings.wheelSpeed*maxY/contentHeight;};var onStartDrag=function(event)
{initDrag();dragMiddle=getPos(event,'Y')-dragPosition-currentOffset.top;$('html').bind('mouseup',onStopDrag).bind('mousemove',updateScroll);if($.browser.msie){$('html').bind('dragstart',ignoreNativeDrag).bind('selectstart',ignoreNativeDrag);}
return false;};var onStopDrag=function()
{$('html').unbind('mouseup',onStopDrag).unbind('mousemove',updateScroll);dragMiddle=percentInView*paneHeight/2;if($.browser.msie){$('html').unbind('dragstart',ignoreNativeDrag).unbind('selectstart',ignoreNativeDrag);}};var positionDrag=function(destY)
{destY=destY<0?0:(destY>maxY?maxY:destY);dragPosition=destY;$drag.css({'top':destY+'px'});var p=destY/maxY;$this.data('jScrollPanePosition',(paneHeight-contentHeight)*-p);$pane.css({'top':((paneHeight-contentHeight)*p)+'px'});$this.trigger('scroll');if(settings.showArrows){$upArrow[destY==0?'addClass':'removeClass']('disabled');$downArrow[destY==maxY?'addClass':'removeClass']('disabled');}};var updateScroll=function(e)
{positionDrag(getPos(e,'Y')-currentOffset.top-dragMiddle);};var dragH=Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2),settings.dragMaxHeight),settings.dragMinHeight);$drag.css({'height':dragH+'px'}).bind('mousedown',onStartDrag);var trackScrollInterval;var trackScrollInc;var trackScrollMousePos;var doTrackScroll=function()
{if(trackScrollInc>8||trackScrollInc%4==0){positionDrag((dragPosition-((dragPosition-trackScrollMousePos)/2)));}
trackScrollInc++;};var onStopTrackClick=function()
{clearInterval(trackScrollInterval);$('html').unbind('mouseup',onStopTrackClick).unbind('mousemove',onTrackMouseMove);};var onTrackMouseMove=function(event)
{trackScrollMousePos=getPos(event,'Y')-currentOffset.top-dragMiddle;};var onTrackClick=function(event)
{initDrag();onTrackMouseMove(event);trackScrollInc=0;$('html').bind('mouseup',onStopTrackClick).bind('mousemove',onTrackMouseMove);trackScrollInterval=setInterval(doTrackScroll,100);doTrackScroll();return false;};$track.bind('mousedown',onTrackClick);$container.bind('mousewheel',function(event,delta){delta=delta||(event.wheelDelta?event.wheelDelta/120:(event.detail)?-event.detail/3:0);initDrag();ceaseAnimation();var d=dragPosition;positionDrag(dragPosition-delta*mouseWheelMultiplier);var dragOccured=d!=dragPosition;return!dragOccured;});var _animateToPosition;var _animateToInterval;function animateToPosition()
{var diff=(_animateToPosition-dragPosition)/settings.animateStep;if(diff>1||diff<-1){positionDrag(dragPosition+diff);}else{positionDrag(_animateToPosition);ceaseAnimation();}}
var ceaseAnimation=function()
{if(_animateToInterval){clearInterval(_animateToInterval);delete _animateToPosition;}};var scrollTo=function(pos,preventAni)
{try
{if(typeof pos=="string"){$e=$(pos,$this);if(!$e.length)return;pos=$e.offset().top-$this.offset().top;}
$container.scrollTop(0);ceaseAnimation();var maxScroll=contentHeight-paneHeight;pos=pos>maxScroll?maxScroll:pos;$this.data('jScrollPaneMaxScroll',maxScroll);var destDragPosition=pos/maxScroll*maxY;if(preventAni||!settings.animateTo){positionDrag(destDragPosition);}else{_animateToPosition=destDragPosition;_animateToInterval=setInterval(animateToPosition,settings.animateInterval);}}
catch(e)
{mrm.util.log('[plugins.jScrollPane] Unable to successfully execute scrollTo, see error below:');mrm.util.log(e);return;}};$this[0].scrollTo=scrollTo;$this[0].scrollBy=function(delta)
{var currentPos=-parseInt($pane.css('top'))||0;scrollTo(currentPos+delta);};initDrag();scrollTo(-currentScrollPosition,true);$('*',this).bind('focus',function(event)
{var $e=$(this);var eleTop=0;while($e[0]!=$this[0]){eleTop+=$e.position().top;$e=$e.offsetParent();}
var viewportTop=-parseInt($pane.css('top'))||0;var maxVisibleEleTop=viewportTop+paneHeight;var eleInView=eleTop>viewportTop&&eleTop<maxVisibleEleTop;if(!eleInView){var destPos=eleTop-settings.scrollbarMargin;if(eleTop>viewportTop){destPos+=$(this).height()+15+settings.scrollbarMargin-paneHeight;}
scrollTo(destPos);}})
if(location.hash){setTimeout(function(){scrollTo(location.hash);},$.browser.safari?100:0);}
$(document).bind('click',function(e)
{$target=$(e.target);if($target.is('a')){var h=$target.attr('href');if(h&&h.substr(0,1)=='#'&&h.length>1){setTimeout(function(){scrollTo(h,!settings.animateToInternalLinks);},$.browser.safari?100:0);}}});function onSelectScrollMouseDown(e)
{$(document).bind('mousemove.jScrollPaneDragging',onTextSelectionScrollMouseMove);$(document).bind('mouseup.jScrollPaneDragging',onSelectScrollMouseUp);}
var textDragDistanceAway;var textSelectionInterval;function onTextSelectionInterval()
{direction=textDragDistanceAway<0?-1:1;$this[0].scrollBy(textDragDistanceAway/2);}
function clearTextSelectionInterval()
{if(textSelectionInterval){clearInterval(textSelectionInterval);textSelectionInterval=undefined;}}
function onTextSelectionScrollMouseMove(e)
{var offset=$this.parent().offset().top;var maxOffset=offset+paneHeight;var mouseOffset=getPos(e,'Y');textDragDistanceAway=mouseOffset<offset?mouseOffset-offset:(mouseOffset>maxOffset?mouseOffset-maxOffset:0);if(textDragDistanceAway==0){clearTextSelectionInterval();}else{if(!textSelectionInterval){textSelectionInterval=setInterval(onTextSelectionInterval,100);}}}
function onSelectScrollMouseUp(e)
{$(document).unbind('mousemove.jScrollPaneDragging').unbind('mouseup.jScrollPaneDragging');clearTextSelectionInterval();}
$container.bind('mousedown.jScrollPane',onSelectScrollMouseDown);$.jScrollPane.active.push($this[0]);}else{if(settings.select){var locWidth=paneWidth-this.originalSidePaddingTotal+bordLft+bordRgt;}else{var locWidth=paneWidth-this.originalSidePaddingTotal-borderWidth;}
try{$this.css({'height':originalHeight,'width':locWidth+'px','padding':this.originalPadding});}
catch(e)
{mrm.util.log('[plugins.jScrollPane] Unable to apply CSS, see error below:');mrm.util.log(e);}
$this[0].scrollTo=$this[0].scrollBy=function(){};$this.parent().unbind('mousewheel').unbind('mousedown.jScrollPane').unbind('keydown.jscrollpane').unbind('keyup.jscrollpane');}})};$.fn.jScrollPaneRemove=function()
{$(this).each(function()
{$this=$(this);var $c=$this.parent();if($c.is('.jScrollPaneContainer')){$this.css({'top':'','height':'','width':'','padding':'','overflow':'','position':''});$c.after($this).remove();}});}
$.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false};$(window).bind('unload',function(){var els=$.jScrollPane.active;for(var i=0;i<els.length;i++){els[i].scrollTo=els[i].scrollBy=null;}});})(mrm.$);(function($){$.event.special.mousewheel={setup:function(){var handler=$.event.special.mousewheel.handler;if($.browser.mozilla)
$(this).bind('mousemove.mousewheel',function(event){$.data(this,'mwcursorposdata',{pageX:event.pageX,pageY:event.pageY,clientX:event.clientX,clientY:event.clientY});});if(this.addEventListener)
this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=handler;},teardown:function(){var handler=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)
this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata');},handler:function(event){var args=Array.prototype.slice.call(arguments,1);event=$.event.fix(event||window.event);$.extend(event,$.data(this,'mwcursorposdata')||{});var delta=0,returnValue=true;if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;event.data=event.data||{};event.type="mousewheel";args.unshift(delta);args.unshift(event);return $.event.handle.apply(this,args);}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});})(mrm.$);;(function($){var tabPressed=false;var keyPressed=false;var blurLock=false;var clickHideLock=false;var acCtr;var recCounter=0;var scrollTimeout;$('body').addClass('js');Array.prototype.indexOf=function(obj,start){for(var i=(start||0);i<this.length;i++){if(this[i]==obj){return i;}}}
$.fn.genCusSelBox=function(){var orgSelWidth=$(this).outerWidth();var liHeight=16;$(this).sSelect({ddMaxHeight:'90',ctrWidth:orgSelWidth,liHeight:liHeight});$(this).addClass('cus-sel-box');},$.fn.reInitSel=function(){var self=$(this);self.nextAll('div:first').remove();self.genCusSelBox();},$.fn.sSelect=function(options){var defaults={defaultText:'Please select',animationSpeed:0,ddMaxHeight:''};var opts=$.extend(defaults,options),$input=$(this),liHeight=options['liHeight'],$containerDivText=$('<div class="selectedTxt" hidefocus></div>'),$containerDiv=$('<div class="newListSelected" tabindex="0" hidefocus></div>'),$newUl=$('<p class="newList" hidefocus></p>'),itemIndex=-1,currentIndex=-1,keys=[],prevKey=false,newListItems='',prevented=false;$containerDiv.insertAfter($input);$containerDivText.prependTo($containerDiv);$newUl.appendTo($containerDiv);$input.hide();$input.addClass('hiddenSelect');if($input.children('optgroup').length==0){$input.children().each(function(i){if(navigator.userAgent.indexOf('MSIE 6')>=0&&i==0){}else{var option=$(this).text();var optVal=$(this).attr('value');keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){opts.defaultText=option;currentIndex=i;}
newListItems+='<span class="'+optVal+'">'+option+'</span>';}});$newUl.html(newListItems);newListItems='';var $newLi=$newUl.children();}else{$input.children('optgroup').each(function(i){var optionTitle=$(this).attr('label'),$optGroup=$('<li class="newListOptionTitle">'+optionTitle+'</li>');$optGroup.appendTo($newUl);var $optGroupList=$('<ul></ul>');$optGroupList.appendTo($optGroup);$(this).children().each(function(){++itemIndex;var option=$(this).text();keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){opts.defaultText=option;currentIndex=itemIndex;}
newListItems+='<li>'+option+'</li>';})
$optGroupList.html(newListItems);newListItems='';});var $newLi=$newUl.find('ul li');}
var newUlHeight=(parseInt($newUl.children('span').css('height'))*$newUl.children('span').length)+((parseInt($newUl.children('span').css('paddingTop'))+parseInt($newUl.children('span').css('paddingBottom')))*$newUl.children('span').length),containerHeight=$containerDiv.height(),newLiLength=$newLi.length;if(currentIndex!=-1){navigateList($input,currentIndex,true);}else{$containerDivText.text(opts.defaultText);}
function navigateList(el,currentIndex,init){var select=$(el);var ctrDiv=select.nextAll('div:first');if(ctrDiv.find('p').length>0){var containerOffsetTop=ctrDiv.offset().top,liOffsetTop=ctrDiv.find('p:first').find('span').eq(currentIndex).offset().top,ulScrollTop=ctrDiv.find('p:first').scrollTop();if(Math.round(liOffsetTop)-(Math.round(containerOffsetTop)+parseInt(opts.ddMaxHeight))-parseInt(ctrDiv.find('ul:first').css('top'))>0){ctrDiv.find('p:first').css('top',-1*(Math.round(liOffsetTop)-(Math.round(containerOffsetTop)+parseInt(opts.ddMaxHeight))-parseInt(ctrDiv.find('p:first').css('top'))));}else{ctrDiv.find('p:first').css('top',0);ctrDiv.find('.jScrollPaneDrag').css('top',0);}
var completeScrollbarHeight=ctrDiv.find('.jScrollPaneTrack').height();var freeScrollbarHeight=completeScrollbarHeight-ctrDiv.find('.jScrollPaneDrag').height();var optionCount=ctrDiv.find('p:first').find('span').length;var step=freeScrollbarHeight/optionCount;ctrDiv.find('.jScrollPaneDrag').css('top',currentIndex*step);if(select.onTop==true){select.liOffsetTop=(((liOffsetTop-containerOffsetTop)-containerHeight)+ulScrollTop)+parseInt(opts.ddMaxHeight);}else{select.liOffsetTop=((liOffsetTop-containerOffsetTop)-containerHeight)+ulScrollTop;}
ctrDiv.find('p:first').scrollTop(select.liOffsetTop);ctrDiv.find('p:first').find('span').removeClass('hiLite').eq(currentIndex).addClass('hiLite');var text=ctrDiv.find('p:first').find('span').eq(currentIndex).text();if(init==true){ctrDiv.find('.selectedTxt:first').text(text);return false;}
ctrDiv.find('.selectedTxt:first').text(text);}else{var containerOffsetTop=ctrDiv.offset().top,liOffsetTop=acCtr.find('p:first').find('span').eq(currentIndex).offset().top,ulScrollTop=acCtr.find('p:first').scrollTop();if(Math.round(liOffsetTop)-(Math.round(containerOffsetTop)+parseInt(opts.ddMaxHeight))-parseInt(acCtr.find('p:first').css('top'))>0){acCtr.find('p:first').css('top',-1*(Math.round(liOffsetTop)-(Math.round(containerOffsetTop)+parseInt(opts.ddMaxHeight))-parseInt(acCtr.find('p:first').css('top'))));}else{acCtr.find('p:first').css('top',0);acCtr.find('.jScrollPaneDrag').css('top',0);}
var completeScrollbarHeight=acCtr.find('.jScrollPaneTrack').height();var freeScrollbarHeight=completeScrollbarHeight-acCtr.find('.jScrollPaneDrag').height();var optionCount=acCtr.find('p:first').find('span').length;var step=freeScrollbarHeight/optionCount;acCtr.find('.jScrollPaneDrag').css('top',currentIndex*step);if(select.onTop==true){select.liOffsetTop=(((liOffsetTop-containerOffsetTop)-containerHeight)+ulScrollTop)+parseInt(opts.ddMaxHeight);}else{select.liOffsetTop=((liOffsetTop-containerOffsetTop)-containerHeight)+ulScrollTop;}
acCtr.find('p:first').scrollTop(select.liOffsetTop);acCtr.find('p:first').find('span').removeClass('hiLite').eq(currentIndex).addClass('hiLite');var text=acCtr.find('p:first').find('span').eq(currentIndex).text();ctrDiv.find('.selectedTxt:first').text(text);}};$input.change(function(event){$targetInput=$(event.target);if(prevented==true){prevented=false;return false;}
$currentOpt=$targetInput.find(':selected');currentIndex=$targetInput.find('option').index($currentOpt);navigateList($targetInput,currentIndex,true);});$newUl.css('left','0');$(this).adaptions(options);},$.fn.handlePosition=function(jscrollpane){},$.fn.adaptions=function(params,dynHeight){el=$(this);$(document).ready(function(){$current=el.nextAll('div.newListSelected:first');var width=params.ctrWidth;$current.css('width',width);$current.find('p:first').show();if($current.find('p:first').find('span').width()<width){$current.find('p:first').width(width+2);}else{$current.find('p:first').width($current.find('p:first').find('span').outerWidth());}
$current.find('.selectedTxt:first').css('width',width-19);$current.find('p:first').addClass('scroll-pane-select');$current.find('p:first').css('width',width-3);$current.find('p:first').jScrollPane({scrollbarWidth:17,showArrows:true,scrollbarMargin:0,maxHeight:params['ddMaxHeight'],isSelect:true,contentHeight:dynHeight});$current.handlePosition(true);$current.selectAddEventListener();$current.find('div.jScrollPaneContainer').addClass('ui-helper-hidden');$current.rebuildDom();});},$.fn.rebuildDom=function(){var self=$(this);var offset=self.offset();var selectHeight=self.height();var randId=mrm.util.getRandomId(1000,1000000);var topOffset=parseInt(offset.top);var leftOffset=offset.left;var marginTop=topOffset+selectHeight;self.children('div.jScrollPaneContainer').attr({'id':randId});self.children('div.jScrollPaneContainer').css({position:'absolute',top:marginTop+"px",left:leftOffset+"px"});self.children('div.selectedTxt').attr({'rel':randId});$('#'+self.children('div').attr('rel')).children('p').css('height','auto');$('body').prepend(self.children('div.jScrollPaneContainer:first'));if(!acCtr){acCtr=$('body').children('div.jScrollPaneContainer:last');}
$(window).resize(function(){$.fn.newUlPos();});$(window).scroll(function(){window.clearTimeout(scrollTimeout);scrollTimeout=window.setTimeout(function(){$.fn.newUlPos();},1000);});},$.fn.newUlPos=function()
{var newUlHeight=acCtr.height();var containerPosY=$('.selectedTxt[rel="'+acCtr.attr("id")+'"]').offset().top;var containerHeight=$('.selectedTxt[rel="'+acCtr.attr("id")+'"]').height();var docHeight=$(window).height(),scrollTop=$(window).scrollTop();var pos=acCtr.position();var posTop=pos.top;var distanceTop=posTop-scrollTop;var distanceBottom=docHeight-distanceTop-newUlHeight;if(distanceBottom<newUlHeight){var marTop=containerPosY-newUlHeight;acCtr.css({top:marTop-1+"px"});}else{var marTop=containerPosY+containerHeight;acCtr.css({top:marTop+1+"px"});}},$.fn.selectAddEventListener=function(){var self=$(this);self.find('*').attr('hideFocus',true);var optionsCount=self.find('p').find('span').length;self.bind('click focus',function(e){var txt=$(this).find('.selectedTxt:first');if(e.type=='click'&&!keyPressed&&!txt.hasClass('open-sel-box')){$('div.selectedTxt').removeClass('open-sel-box');blurLock=true;txt.showSelect();acCtr.addClass('newListSelFocus');$.fn.newUlPos();}else if(e.type=='click'&&!keyPressed&&!clickHideLock&&txt.hasClass('open-sel-box')){txt.removeClass('open-sel-box');hideAll(acCtr);}else if(e.type=='click'&&keyPressed){blurLock=true;keyPressed=false;txt.showSelect();}else if(e.type=='focus'&&keyPressed&&!txt.hasClass('open-sel-box')){txt.showSelect();keyPressed=false;blurLock=true;}
keyPress(this);});self.bind('mouseenter',function(){blurLock=true;});self.bind('mouseleave',function(){if(self.find('.open-sel-box').length>0){blurLock=false;self.focus();}});self.bind('blur',function(){if(!blurLock){hideAll(self);self.find('.selectedTxt').removeClass('open-sel-box');}
blurLock=false;});$('input,textarea').bind('focus',function(){keyPressed=false;keyPress(this);});self.find('.selectedTxt').bind('mouseout',function(){blurLock=false;});self.find('p').find('span').each(function(){$(this).bind('mouseover',function(){$('#'+self.children('div:first').attr('rel')).find('p').find('span').removeClass('newListHover');$(this).addClass('newListHover');});$(this).bind('mousedown',function(){saveSelected(self);});});self.find('.jScrollPaneTrack, .jScrollArrowUp, .jScrollArrowDown').bind('mouseover',function(){clickHideLock=true;blurLock=true;});self.find('.jScrollPaneTrack, .jScrollArrowUp, .jScrollArrowDown').bind('mouseout',function(){clickHideLock=false;blurLock=false;self.focus();});function hideAll(el){var self=$(el);acCtr.removeClass('newListSelFocus');acCtr.find('p:first').hide();acCtr.find('p').find('span').removeClass('newListHover');acCtr.removeClass('act-sel-ctr');acCtr.find('.selectedTxt').removeClass('open-sel-box');}
function keyPress(element){element.onkeydown=function(e){if(e==null){var keycode=event.keyCode;}else{var keycode=e.which;}
prevented=true;switch(keycode)
{case 9:if(e==null){var shiftkey=event.shiftKey;}else{var shiftkey=e.shiftKey;}
keyPressed=true;if(shiftkey){selectNext(this,0);}else if(!shiftkey){selectNext(this,1);}
return false;break;case 40:case 39:incrementList(this);return false;break;case 38:case 37:decrementList(this);return false;break;case 33:case 36:gotoFirst(this);return false;break;case 34:case 35:gotoLast(this);return false;break;case 13:saveSelected(this);return false;break;case 27:hideAll(this);return false;break;}}}
function incrementList(el){var _selectedOptionIndex=_getSelectedOptionIndex(el);var _optionCount=_getOptionCount(el);var _selIndex=$('#'+$(el).children('div:first').attr('rel'));if(_selectedOptionIndex<_optionCount-1){_incrementSelOption($(el).prevAll('select:first'));_selIndex.find('p').find('span').removeClass('newListHover');_selIndex.find('p').find('span:eq('+(_selectedOptionIndex+1)+')').addClass('newListHover');}}
function decrementList(el){var _selectedOptionIndex=_getSelectedOptionIndex(el);var _selIndex=$('#'+$(el).children('div:first').attr('rel'));if(_selectedOptionIndex>0){_decrementSelOption($(el).prevAll('select:first'));_selIndex.find('p').find('span').removeClass('newListHover');_selIndex.find('p').find('span:eq('+(_selectedOptionIndex-1)+')').addClass('newListHover');}}
function _getSelectedOptionIndex(el){var _optIndex=null;$(el).prevAll('select:first').children('option').each(function(i){if($(this).attr('selected')){_optIndex=i;}});return _optIndex;}
function _getOptionCount(el){return $(el).prevAll('select:first').children('option').length;}
function _incrementSelOption(el){var $_newSelOpt=$(el).find('option[selected]').next();$(el).children('option').removeAttr('selected');$_newSelOpt.attr('selected','selected');$(el).change();}
function _decrementSelOption(el){var $_newSelOpt=$(el).find('option[selected]').prev();$(el).children('option').removeAttr('selected');$_newSelOpt.attr('selected','selected');$(el).change();}
function gotoFirst(el){var self=$(el);self.find('p').find('span').removeClass('newListHover');self.find('p').find('span:first').addClass('newListHover');self.find('p').css('top',0);self.find('.jScrollPaneDrag').css('top',0);_setFirstSelected(self.prevAll('select:first'));}
function _setFirstSelected(el){var self=$(el);self.children('option').removeAttr('selected');self.children('option:first').attr('selected','selected');}
function _setLastSelected(el){var self=$(el);self.children('option').removeAttr('selected');self.children('option:last').attr('selected','selected');}
function gotoLast(el){var self=$(el);self.find('p').find('span').removeClass('newListHover');self.find('p').find('span:last').addClass('newListHover');var containerOffsetTop=self.offset().top,liOffsetTop=self.find('p').find('span:last').offset().top,ulScrollTop=self.find('p').scrollTop(),maxHeight=self.find('.jScrollPaneContainer').height();self.find('p').css('top',-1*(Math.round(liOffsetTop)-(Math.round(containerOffsetTop)+parseInt(maxHeight))-parseInt(self.find('p').css('top'))));var completeScrollbarHeight=self.find('.jScrollPaneTrack').height();var freeScrollbarHeight=completeScrollbarHeight-self.find('.jScrollPaneDrag').height();var optionCount=_getOptionCount(self.parent());var splitOptionCount=optionCount-_getSelectedOptionIndex(self.parent());self.find('.jScrollPaneDrag').css('top',freeScrollbarHeight/splitOptionCount);_setLastSelected(self.prevAll('select:first'));}
function saveSelected(el){var self=$(el);var asCtr=$('#'+self.children('div:first').attr('rel'));var _orgSelect=self.prevAll('select:first');_orgSelect.children('option').removeAttr('selected');asCtr.find('p').find('span').removeClass('hiLite');asCtr.find('p').find('span.newListHover').addClass('hiLite');asCtr.find('p').find('span.newListHover').keydown();var value=asCtr.find('p').find('span.newListHover').attr('class').split(' ')[0];_orgSelect.children().each(function(i){if($(this).attr('value')==value){$(this).attr('selected','selected');_orgSelect.change();}});self.find('.selectedTxt').html(asCtr.find('p').find('span.newListHover').html());hideAll(self);if(self.parent().parent().parent().parent().parent().hasClass('mds-cmp-content04 ')){mrm.cmp.cnt_tbl_fs_1.setTrimVarAfterKeyDown();}}
function selectNext(el,direction){var self=$(el);self.children('div:first').removeClass('open-sel-box');var asCtr=$('#'+self.children('div:first').attr('rel'));asCtr.removeClass('newListSelFocus');tabPressed=true;hideAll();if(direction==1){if(self.nextAll('div.newListSelected:first,:input:visible:first').length<=0){lookInParent(self,true);}else{self.nextAll('div.newListSelected:first,:input:visible:first').focus();}}else{if(self.prevAll('div.newListSelected:first,:input:visible:first').length<=0){lookInParent(self,false);}else{self.prevAll('div.newListSelected:first,:input:visible:first').focus();}}}
function lookInParent(el,down){if(recCounter<=20){recCounter++;if(down){if(el.parent().nextAll().find('div.newListSelected,:input:visible').eq(0).length>0){el.parent().nextAll().find('div.newListSelected,:input:visible').eq(0).focus();}else{lookInParent(el.parent(),true);}}else{if(el.parent().prevAll().find('div.newListSelected,:input:visible').eq(0).length>0){el.parent().prevAll().find('div.newListSelected,:input:visible').eq(0).focus();}else{lookInParent(el.parent(),false);}}}else{recCounter=0;return false;}}},$.fn.showSelect=function(){var asCtr=$('#'+$(this).attr('rel'));acCtr=asCtr;var self=$(this);var _selectIndex=self.parent();var _scrollbarPos=null;tabPressed=false;function positionFix(el){el.css('position','relative');}
function positionHideFix(el){el.css('position','static');}
if(!self.hasClass('act-sel-box')){$('body > .jScrollPaneContainer').removeClass('newListSelFocus');$('.selectedTxt').removeClass('act-sel-box');}
self.addClass('open-sel-box');self.addClass('act-sel-box');self.parent().addClass('act-sel-ctr');asCtr.addClass('newListSelFocus');asCtr.find('p:first').show();asCtr.find('p:first').scrollTop(_selectIndex.liOffsetTop);};})(mrm.$);;;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(mrm.$);;(function($){$.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){if($(this).height()>tallest){tallest=$(this).height();}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){$(this).height(tallest).css("overflow","auto");});}})(mrm.$);;(function($){mrm.util=mrm.util||{};$.extend(mrm.util,{initAll:function(obj,c){var block=false;for(key in obj){for(var i=mrm.block.length-1;i>=0;i--){if(mrm.block[i]==key){block=true;mrm.util.log('[menu.util.initAll]  Preventing module "'+key+'" from loading!');}};if(obj[key].tpl){block=true;for(var i=obj[key].tpl.length-1;i>=0;i--){if(mrm.util.curTemplate()==obj[key].tpl[i])block=false;}
if(block)mrm.util.log('+++++ ['+key+'] not getting loaded on this template');}
if($.isFunction(obj[key].init)===true&&!block){obj[key].init(c);}
block=false;};},getLang:function(string){if(mrm.lang){var n=mrm.lang;if(!n.current&&mrm.debug){alert('please define the language by setting "mrm.lang.current"');}
else if(n[n.current][string]!==undefined){return n[n.current][string];}}
return null;},ie6:function(){if($.browser.msie&&(parseFloat($.browser.version)<7)){return true;}
return false;},ie:function(){if($.browser.msie){return true;}
return false;},mozilla:function(){if($.browser.mozilla){return true;}
return false;},visible:function(t){var display=$(t).css('display');if(display!='none'&&display!='undefined'){return true;}
return false;},optionSelect:function(t,v){$(t).find('option[selected=selected]').attr('selected','');$(t).find('option[value='+v+']').attr('selected','selected');return t;},disable:function(t,disable){if(disable===true){$(t).attr('disabled','disabled').addClass('disabled');}
else if(disable===false){$(t).attr('disabled','').removeClass('disabled');}else if($(t).attr('disabled')=='disabled'){$(t).attr('disabled','').removeClass('disabled');}else{$(t).attr('disabled','disabled').addClass('disabled');}
return t;},fillSelect:function(t,object,disable){$(t).empty();if(disable){mrm.util.disable(t,true);}
else{mrm.util.disable(t,false);}
for(var key in object){if(object.hasOwnProperty(key)){$(t).append('<option value="'+key+'">'+object[key]+'</option>');}}},debug:{serverRequest:function(string){if(mrm.debug){mrm.util.log('[ServerRequest] Implementation needed for: '+string);}}},string:{trim:function(str,chars){return mrm.util.string.ltrim(mrm.util.string.rtrim(str,chars),chars);},ltrim:function(str,chars){chars=chars||"\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");},rtrim:function(str,chars){chars=chars||"\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");},isEnter:function(e){if((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)){return true;}
return false;},strip:function(str,special){var strip=this.prepare(str);if(special){strip=strip.replace('/.+<p>/gi','##p##');strip=strip.replace('/.+<brs?/ ? >/gi','##b##');}
strip=strip.replace('/<(?:.|s)*?>/g','');if(special){strip=strip.replace('/##p##/g','<br /><br />');strip=strip.replace('/##b##/g','<br />');}
return strip;}},copyright:function(){if(window.console&&mrm.debug){console.log(mrm.copyright);}},log:function(text){if(window.console&&mrm.debug){console.log(text);}},error:function(text){if(window.console&&mrm.debug){console.error(text);}},clearInput:function(id,defaultVal){$(id).focus(function(){if($(this).attr('value')==defaultVal){$(this).attr({value:''});}});$(id).blur(function(){var newValue=$(this).attr('value');if(newValue==''){$(this).attr({value:$(this).attr('defaultValue')});}});},getRandomId:function(min,max){if(min>max){return(-1);}
if(min==max){return(min);}
var randId=min+parseInt(Math.random()*(max-min+1));if($('#'+randId).length<=0){return(randId);}else{mrm.util.getRandomId();}},exists:function(){return $(this).length>0;},curTemplate:function(){return $('div[id^="mds-tpl"]').attr('id').substr(8);}});})(mrm.$);;(function($){mrm.iefix=mrm.iefix||{};$.extend(mrm.iefix,{bgiframe:{init:function(c){if(c==='body'){mrm.util.log("[iefix.bgiframe] context: "+c);$('select',c).bgiframe();}}}});})(mrm.$);;(function($){mrm.iefix=mrm.iefix||{};$.extend(mrm.iefix,{flicker:{init:function(c){if(c==='body'){mrm.util.log("[iefix.flicker] context: "+c);var fix=true;try{document.execCommand("BackgroundImageCache",false,fix);}catch(err){}}}}});})(mrm.$);;(function($){mrm.iefix=mrm.iefix||{};$.extend(mrm.iefix,{init:function(c){mrm.util.log("[iefix] context: "+c);if($.browser.msie&&(parseFloat($.browser.version)<8)){mrm.util.initAll(mrm.iefix,c);}}});})(mrm.$);;(function($){var out=0;var first=1;var firstCardVisible=0;var baseballcards=new Array();var carlines=new Array();var delayOut=850;var delayIn=250;var displayElement=null;var visible=false;var childsOpen=false;if($("html").attr("dir")==="rtl"){var cssPlacement="right";}else{var cssPlacement="left";}
mrm.menu={init:function(c){mrm.util.log('[menu.init] Context: '+c);$("#mds-cmp-1stlevelnavigation").addClass("ui-widget");$("#mds-cmp-1stlevelnavigation > ul ul").find('li:last-child').each(function(i){$(this).after('<li class="last"></li>');});$("#mds-cmp-1stlevelnavigation > ul ul").find('li:first-child').each(function(i){$(this).before('<li class="first"></li>');});$('#mds-cmp-1stlevelnavigation').find('a').each(function(i){if($(this).attr('rel')){$(this).addClass('includeBBC');}});$('#mds-cmp-1stlevelnavigation').find('ul:first').mouseleave(function(){out=window.setTimeout("mrm.menu.hideAll()",delayOut);if(!childsOpen){mrm.menu.resetActiveClass();}
visible=false;});$('#mds-cmp-1stlevelnavigation').find('ul:first').mouseenter(function(){window.clearTimeout(out);visible=true;});$('#mds-cmp-1stlevelnavigation').find('ul:first').find('li').mouseenter(function(){visible=true;});$('body').bind('click',function(){if(!visible){mrm.menu.hideAll();}});$("#mds-cmp-1stlevelnavigation").children('ul:first').children('li').children('a').mouseenter(function(){if($(this).parent().attr('class')!="active"&&first!=1){mrm.menu.hideAll();mrm.menu.resetActiveClass();}
$(this).parent().addClass("active");first=0;clearTimeout(timeoutIn);displayElement=$(this);var timeoutIn=window.setTimeout(function(){if(visible){mrm.menu.showNextLayer(displayElement);}},delayIn);});},showNextLayer:function(hoveredLink){$('#mds-cmp-1stlevelnavigation ul.baseballcard').each(function(){$(this).removeClass('visible');});hoveredLink.nextAll('ul').children('li').each(function(){$(this).removeClass("li_active");});childsOpen=true;hoveredLink.siblings('ul:first').addClass('visible');hoveredLink.parent().children('ul').children('li').each(function(i){$(this).children('a').mouseover(mrm.menu.chooseAndShowLayer);});if(hoveredLink.parent().css('float')!=cssPlacement){hoveredLink.parent().children('ul').css(cssPlacement,hoveredLink.parent().parent().width());}
hoveredLink.siblings('ul:first').children("li:last").width(hoveredLink.siblings('ul:first').children('li:last').prev().width()+1);},chooseAndShowLayer:function(event){var link=$(event.target);if(link.attr('rel')!=""&&!mrm.menu.in_array(link.attr('rel'),carlines)){carlines.push(link.attr('rel'));link.after('<ul></ul>').next('ul').addClass('baseballcard').addClass('visible').css(cssPlacement,link.parent().parent().width()).load(link.attr('rel'),null,mrm.menu.callback(link));}else{mrm.menu.callback(link);}},callback:function(el){mrm.menu.hideEl(el.parent().parent());mrm.menu.setParentLiActive(el);mrm.menu.hideAllBaseballCards();if(el.hasClass('includeBBC')==true){mrm.menu.markBbc(el.parent().children('ul:first'));}else{mrm.menu.showNextLayer(el);}},markBbc:function(el){if(el.find('div.baseballcard').length>0){el.find('div.baseballcard').each(function(i){$(this).addClass('bbc_div');});mrm.menu.SetBaseballCardLinks(el.parent().children('ul:first'));}else{window.setTimeout(function(){mrm.menu.markBbc(el);},100);}},SetBaseballCardLinks:function(el){baseballcards=new Array();el.find('div.bbc_div').each(function(i){baseballcards[i]=$(this);$(this).parent().find('a:first').mouseover(function(){mrm.menu.showBaseballCards(i);});});mrm.menu.showBaseballcardLayer(el);},showBaseballcardLayer:function(el){$('#mds-cmp-1stlevelnavigation ul.baseballcard.visible').each(function(){$(this).removeClass('visible');});el.addClass("visible");if(firstCardVisible!=1){mrm.menu.showBaseballCards(0);}},showBaseballCards:function(el){firstCardVisible=1;for(var i=0;i<baseballcards.length;i++){if(mrm.util.ie6()){$("#mds-cmp-1stlevelnavigation div.baseballcard.bbc_div.active").css('display','none');}
baseballcards[i].removeClass('active');}
baseballcards[el].addClass("active");if(mrm.util.ie6()){baseballcards[el].css('display','block');$(".baseballcard.visible").css({'background-color':'#fff','top':'0'});$("#mds-cmp-1stlevelnavigation li.baseballcard > a").css({'position':'absolute','bottom':'100px',cssPlacement:'13px'});$("#mds-cmp-1stlevelnavigation li.baseballcard + li > a").css({'position':'absolute','bottom':'80px',cssPlacement:'13px'});$("#mds-cmp-1stlevelnavigation div.baseballcard div.further").css('margin-bottom','15px');$("#mds-cmp-1stlevelnavigation div.baseballcard div.further > a span").css('padding-left','10px');}},in_array:function(item,arr){for(p=0;p<arr.length;p++)if(item==arr[p])return true;return false;},hideAll:function(){childsOpen=false;$("#mds-cmp-1stlevelnavigation > ul:first").find("ul").each(function(i){$(this).removeClass("visible");$(this).parent().removeClass("active");$(this).find("li").each(function(){if($(this).attr('class')=="activeLi"){$(this).removeClass("activeLi");}});});mrm.menu.resetActiveClass();mrm.menu.hideAllBaseballCards();$("#mds-cmp-1stlevelnavigation li.li_active").each(function(){$(this).removeClass("li_active");});startIn=false;},hideEl:function(el){el.children('li').children('ul').each(function(){$(this).removeClass("visible");});},resetActiveClass:function(){$("#mds-cmp-1stlevelnavigation ul:first").find('li').each(function(i){$(this).removeClass("active");});},hideAllBaseballCards:function(){$(".baseballcard.active").each(function(){$(this).removeClass("active");});$('.ul_baseballcard').each(function(){$(this).removeClass('ul_baseballcard');});firstCardVisible=0;},setParentLiActive:function(el){el.parent().parent().children().each(function(){$(this).removeClass("li_active");});el.parent().addClass("li_active");}};})(mrm.$);;(function($){$.widget('ui.checkBox',{_init:function()
{if(!this.element.is(':radio,:checkbox')){return false;}
var that=this,opts=this.options,toggleHover=function(e)
{if(this.disabledStatus){return false;}
that.hover=(e.type=='focus'||e.type=='mouseenter');that._changeStateClassChain();};this.labels=$([]);this.checkedStatus=false;this.disabledStatus=false;this.hoverStatus=false;this.radio=(this.element.is(':radio'));this.visualElement=$('<span />').addClass(this.radio?'ui-radio':'ui-checkbox').bind('mouseenter.checkBox mouseleave.checkBox',toggleHover).bind('click.checkBox',function()
{that.element[0].click();if($.browser.msie&&!that.disabledStatus)
$(that.element[0]).trigger('change');return false;}).bind('keypress.checkBox',function(ev)
{if(ev.which==32)
{$(that.element[0]).trigger('click');return false;}
else
return true;});if(opts.replaceInput)
{this.element.addClass('ui-helper-hidden-accessible').after(this.visualElement[0]).bind('usermode',function(e)
{(e.enabled&&that.destroy.call(that,true));});$(this.element).each(function()
{if(typeof($(this).attr('title'))!="undefined"&&$(this).attr('title')!="")
$(that.visualElement[0]).attr('title',$(this).attr('title'));if(typeof($(this).attr('tabindex'))!="undefined"&&$(this).attr('tabindex')!="")
{$(that.visualElement[0]).attr('tabindex',$(this).attr('tabindex'));$(this).removeAttr('tabindex');}});}
this.element.bind('click.checkBox',$.bind(this,this.reflectUI)).bind('focus.checkBox blur.checkBox',toggleHover);this.element.bind('click.checkBox',function(e)
{if(that.radio==true){$(e.target).closest("li.ui-state-error").removeClass("ui-state-error");$(e.target).parent().parent().find("li.ui-state-error").removeClass("ui-state-error");}
else if((that.radio==false)&&(that.checkedStatus==true)){$(e.target).parent("li").removeClass("ui-state-highlight");$(e.target).parent("li").removeClass("ui-state-active");}
else if((that.radio==false)&&(that.checkedStatus==false)){$(e.target).parent("li").removeClass("ui-state-active");}
else{}});if(opts.addLabel)
{this.labels=$('label[for='+this.element.attr('id')+']').bind('mouseenter.checkBox mouseleave.checkBox',toggleHover);}
this.reflectUI({type:'initialReflect'});},_changeStateClassChain:function()
{var stateClass=(this.checkedStatus)?'-checked':'',baseClass='ui-'+((this.radio)?'radio':'checkbox')+'-state';stateClass+=(this.disabledStatus)?'-disabled':'';stateClass+=(this.hover)?'-hover':'';if(stateClass){stateClass=baseClass+stateClass;}
function switchStateClass(){var classes=this.className.split(' '),found=false;$.each(classes,function(i,classN){if(classN.indexOf(baseClass)===0){found=true;classes[i]=stateClass;return false;}});if(!found){classes.push(stateClass);}
this.className=classes.join(' ');}
try{this.labels.each(switchStateClass);this.visualElement.each(switchStateClass);}
catch(e){}},destroy:function(onlyCss)
{this.element.removeClass('ui-helper-hidden-accessible');this.visualElement.addClass('ui-helper-hidden');if(!onlyCss){var o=this.options;this.element.unbind('.checkBox');this.visualElement.remove();this.labels.unbind('.checkBox').removeClass('ui-state-hover ui-state-checked ui-state-disabled');}},disable:function()
{this.element[0].disabled=true;this.reflectUI({type:'manuallyDisabled'});},enable:function()
{this.element[0].disabled=false;this.reflectUI({type:'manuallyenabled'});},toggle:function(e)
{this.changeCheckStatus((this.element.is(':checked'))?false:true,e);},changeCheckStatus:function(status,e)
{if(e&&e.type=='click'&&this.element[0].disabled){return false;}
this.element.attr({'checked':status});this.reflectUI(e||{type:'changeCheckStatus'});},propagate:function(n,e,_noGroupReflect)
{if(!e||e.type!='initialReflect'){if(this.radio&&!_noGroupReflect){$(document.getElementsByName(this.element.attr('name'))).checkBox('reflectUI',e,true);}
return this._trigger(n,e,{options:this.options,checked:this.checkedStatus,labels:this.labels,disabled:this.disabledStatus});}},reflectUI:function(elm,e)
{var oldChecked=this.checkedStatus,oldDisabledStatus=this.disabledStatus;e=e||elm;this.disabledStatus=this.element.is(':disabled');this.checkedStatus=this.element.is(':checked');if(this.disabledStatus!=oldDisabledStatus||this.checkedStatus!==oldChecked){this._changeStateClassChain();(this.disabledStatus!=oldDisabledStatus&&this.propagate('disabledChange',e));(this.checkedStatus!==oldChecked&&this.propagate('change',e));}},update:function()
{this.reflectUI({type:'updatingReflect'});}});$.ui.checkBox.defaults={replaceInput:true,addLabel:true};$.ui.checkBox.getter="update";})(mrm.$);;(function($){$selected=null;var focus=false;var formEl=new Array();mrm.selectbox=mrm.selectbox||{};$.extend(mrm.selectbox,{init:function(c){mrm.util.log("[selectbox] context: "+c);}});})(mrm.$);(function($){$.bind=function(object,method){var args=Array.prototype.slice.call(arguments,2);if(args.length){return function(){var args2=[this].concat(args,$.makeArray(arguments));return method.apply(object,args2);};}else{return function(){var args2=[this].concat($.makeArray(arguments));return method.apply(object,args2);};}};})(mrm.$);(function($){mrm.radio_checkbox_beautify=mrm.radio_checkbox_beautify||{};$.extend(mrm.radio_checkbox_beautify,{init:function(c)
{var self=this;if(mrm.util.curTemplate()!="16"){$('input:not(".ui-helper-hidden-accessible")').checkBox();}else{$('input[checked]:not([disabled], ".mds-vc-prototype", ".ui-no-input-replace")').livequery(function()
{self._checkReplaceState(this);});$('input[checked][disabled]:not(".mds-vc-prototype", ".ui-no-input-replace")').livequery(function()
{self._checkReplaceState(this);});$('input[disabled]:not([checked], ".mds-vc-prototype", ".ui-no-input-replace")').livequery(function()
{self._checkReplaceState(this);});$('input:not([checked], [disabled], ".mds-vc-prototype", ".ui-no-input-replace")').livequery(function()
{self._checkReplaceState(this);});$('input[title]:not(".mds-vc-prototype", ".ui-no-input-replace")').livequery(function()
{var replacement=mrm.$(this).next("span.ui-checkbox, span.ui-radio");if(replacement.length>0)
{var title=mrm.$(this).attr("title");self._updateTooltip(replacement,title);}});}},_checkReplaceState:function(el)
{var element=$(el);var replSelector="span.ui-checkbox, span.ui-radio";var replacement=element.next(replSelector);if(replacement.length==0)
{element.checkBox();replacement=element.next(replSelector);}
else if(element.is(':radio, :checkbox'))
{element.checkBox('update');}
if(replacement.length>0)
{var title=element.attr("title");this._updateTooltip(replacement,title);}},_updateTooltip:function(element,text)
{if(element!=undefined&&element!=null)
{if(text!=""&&text!=undefined&&text!=null)
{text=text.split("##");var cnt="";$.each(text,function(i){cnt+="<li>"+this+"</li>";});if(cnt!="")
element.tooltip({showURL:false,fixPNG:true,extraClass:"",bodyHandler:function(){return $("<ul>"+cnt+"</ul>");}});}
else
{element.tooltip({extraClass:"ui-helper-hidden"});}}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{init:function(c){mrm.util.log("[mrm.cmp] context: "+c);mrm.util.initAll(mrm.cmp,c);}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{has_mdsAreaPT:{tpl:['04','05','06','08','09','12','13','14'],init:function(c){mrm.util.log('[mrm.cmp.has_mdsAreaPT] Context: '+c);$('div[id^="mds-tpl"]:has("div.mds-area-ptl")').addClass('has_ptl');$('div[id^="mds-tpl"]:has("div.mds-area-ptr")').addClass('has_ptr');}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{lastChild:{init:function(c){mrm.util.log('[mrm.cmp.lastChild] Context: '+c);}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{CSSempty:{tpl:['05','08','10','13','14','16','17'],init:function(c){mrm.util.log('[mrm.cmp.CSSempty] Context: '+c);if(mrm.util.ie()){$('div[class*="mds-cmp"]:empty').addClass('CSSempty');}}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{cnt_faq_1:{tpl:['08','14'],init:function(c){mrm.util.log('[mrm.cmp.cnt_faq_1] Context: '+c);$('div.cnt_faq_1 dl').accordion({collapsible:true,autoHeight:false});}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{mm_gal_1:{tpl:['07'],addtargetclass:function(){if(typeof(targetid)=="undefined")targetid="#"+$('.mm_gal_1 dt:target').attr('id');if(targetid=="#undefined")targetid="#item01";mrm.util.log('[mrm.cmp.mm_gal_1.addtargetclass] '+targetid);$('.mm_gal_1 dt:not("'+targetid+'")').addClass('ui-helper-hidden').next('dd').addClass('ui-helper-hidden');},init:function(c){mrm.util.log('[mrm.cmp.mm_gal_1] Context: '+c);if(mrm.util.ie())mrm.cmp.mm_gal_1.addtargetclass();var hashtag=false
var itemNumber=null;if(document.URL.split('#')[1]){hashtag=document.URL.split('#')[1];itemNumber=parseInt(hashtag.split('item')[1])-1;if($('.mm_gal_1 ul.gallery li:eq('+itemNumber+')').length){$('.mm_gal_1 ul.gallery li:eq('+itemNumber+')').addClass('active');}else{}}else{$('.mm_gal_1 ul.gallery li:first').addClass('active');}
$('div.mm_gal_1 ul.gallery li a, div.mm_gal_1 ul.functions a.next, div.mm_gal_1 ul.functions a.prev').each(function(){$(this).attr('rel',$(this).attr('href'));$(this).attr('href','javascript:void(0);');});$('div.mm_gal_1 ul.gallery li a, div.mm_gal_1 ul.functions a.next, div.mm_gal_1 ul.functions a.prev').click(function(){mrm.util.log('[mrm.cmp.mm_gal_1] clicking - Context: '+$(this).attr('rel'));$('div.mm_gal_1 ul.gallery li.active').removeClass('active');$('div.mm_gal_1 .stage dt.ui-helper-hidden').removeClass('ui-helper-hidden').next('dd').removeClass('ui-helper-hidden');$('div.mm_gal_1 .stage dt:not("'+$(this).attr('rel')+'")').addClass('ui-helper-hidden').next('dd').addClass('ui-helper-hidden');});$('div.mm_gal_1 ul.gallery li').click(function(){$(this).addClass('active');});$('div.mm_gal_1 ul.functions a.next, div.mm_gal_1 ul.functions a.prev').click(function(){$("div.mm_gal_1 ul.gallery a[rel='"+$(this).attr('rel')+"']").parent('li').addClass('active');});$('div.mm_gal_1 ul.functions a.zoom').click(function(){window.open($(this).attr('href'),'enlarge_image','fullscree=true');return false;});$('div.mm_gal_1 form.download').submit(function(){var url=$(this).find(':selected').val()
if(url!='none')window.open(url,'download_wallpaper','fullscree=true');return false;});}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{mm_gal360_1:{tpl:['07'],startinterior:function(){mrm.util.log('[mrm.cmp.mm_gal360_1.startinterior]');flashobject_interior=swfobject.getObjectById("mm_gal360_1-interior");if(typeof(flashobject_interior)!="undefined"&&typeof(flashobject_interior.cleanUp)!="undefined"&&typeof(flashobject_interior.start)!="undefined"){mrm.util.log('[flashobject_interior]');flashobject_interior.cleanUp();flashobject_interior.start("14","24");}else{if(typeof(flashobject_interior)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_interior undefined - will try again');if(typeof(flashobject_interior.cleanUp)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_interior.cleanUp undefined - will try again');if(typeof(flashobject_interior.start)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_interior.start undefined - will try again');setTimeout('mrm.cmp.mm_gal360_1.startinterior()',500);}},changeexterior:function(url){mrm.util.log('[mrm.cmp.mm_gal360_1.changeexterior] - URL: '+url);if(typeof(url)=="undefined"||url=="")url=$('.mm_gal360_1 .exterior .gallery li.active a').attr('rel');flashobject_exterior=swfobject.getObjectById("mm_gal360_1-exterior");if(typeof(flashobject_exterior)!="undefined"&&typeof(flashobject_exterior.refreshTurntable)!="undefined"){mrm.util.log('[flashobject_exterior.refreshTurntable] - new mmg asset - '+url);flashobject_exterior.refreshTurntable(url);}else{if(typeof(flashobject_exterior)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_exterior undefined');if(typeof(flashobject_exterior.refreshTurntable)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_exterior.refreshTurntable undefined');setTimeout('mrm.cmp.mm_gal360_1.changeexterior("'+url+'")',500);}},changeinterior:function(url){mrm.util.log('[mrm.cmp.mm_gal360_1.changeinterior] - URL: '+url);if(typeof(url)=="undefined"||url=="")url=$('.mm_gal360_1 .interior .gallery li.active a').attr('rel');flashobject_interior=swfobject.getObjectById("mm_gal360_1-interior");if(typeof(flashobject_interior)!="undefined"&&typeof(flashobject_interior.changeConfiguration)!="undefined"){mrm.util.log('[flashobject_interior.changeConfiguration]');flashobject_interior.changeConfiguration(url);}else{if(typeof(flashobject_interior)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_interior undefined');if(typeof(flashobject_interior.changeConfiguration)=="undefined")mrm.util.error('[mm_gal360_1] flashobject_interior.changeConfiguration undefined');setTimeout('mrm.cmp.mm_gal360_1.changeinterior("'+url+'")',500);}},setNavbyTarget:function(target){if(typeof(target)=="undefined")target=$(':target').attr('id');if(target=="undefined"||$(':target').attr('id')=="undefined"||typeof($(':target').attr('id'))=="undefined")target="exterior_stage";mrm.util.log('[mrm.cmp.mm_gal360_1.setNavbyTarget] - target: '+target);$('.mm_gal360_1 .view li.active').removeClass('active');$('.mm_gal360_1 .view a[href="#'+target+'"]').parent('li').addClass('active');},init:function(c){mrm.util.log('[mrm.cmp.mm_gal360_1] Context: '+c);mrm.cmp.mm_gal360_1.setNavbyTarget();$('div.mm_gal360_1 .view a').click(function(){$('.mm_gal360_1 .view li.active').removeClass('active');$(this).parent('li').addClass('active');});$('.mm_gal360_1 .exterior .gallery a').click(function(){mrm.util.log('[mrm.cmp.mm_gal360_1 Exterior] Context: '+c);mrm.cmp.mm_gal360_1.changeexterior($(this).attr('rel'));$('.mm_gal360_1 .exterior .gallery li.active').removeClass('active');$(this).parent('li').addClass('active');mrm.cmp.mm_gal360_1.setNavbyTarget('exterior_stage');});$('.mm_gal360_1 .interior .gallery a').click(function(){mrm.util.log('[mrm.cmp.mm_gal360_1 Interior] Context: '+c);mrm.cmp.mm_gal360_1.changeinterior($(this).attr('rel'));$('.mm_gal360_1 .interior .gallery li.active').removeClass('active');$(this).parent('li').addClass('active');mrm.cmp.mm_gal360_1.setNavbyTarget('interior_stage');});}}});})(mrm.$);;(function($){if($("html").attr("dir")==="rtl"){var cssPlacement="right";}else{var cssPlacement="left";}
mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{mm_mos_1:{tpl:['06'],pos:0,width:0,duration:1500,bind:function(){mrm.util.log('[mrm.cmp.mm_mos_1.bind]');$('.mm_mos_1 > span.prev').click(mrm.cmp.mm_mos_1.prev);$('.mm_mos_1 > span.next').click(mrm.cmp.mm_mos_1.next);},unbind:function(){mrm.util.log('[mrm.cmp.mm_mos_1.unbind]');$('.mm_mos_1 > span.prev, .mm_mos_1 > span.next').unbind('click');},state:function(pos){var items=$('.mm_mos_1 li').length;$('.mm_mos_1 > span.next').toggleClass('ui-state-disabled',(pos>=items-1||items==1));$('.mm_mos_1 > span.prev').toggleClass('ui-state-disabled',(pos<1||items==1));},next:function(){mrm.util.log('[mrm.cmp.mm_mos_1.next]');mrm.cmp.mm_mos_1.state(mrm.cmp.mm_mos_1.pos+1);if(mrm.cmp.mm_mos_1.pos<$('.mm_mos_1 li').length-1){mrm.cmp.mm_mos_1.unbind();var $elm=$('.mm_mos_1 li');$elm.each(function(){var placement=parseInt($(this).css(cssPlacement));if(cssPlacement==='left'){$(this).animate({left:(placement-mrm.cmp.mm_mos_1.width)+'px'},{duration:mrm.cmp.mm_mos_1.duration},window.setTimeout("mrm.cmp.mm_mos_1.bind()",mrm.cmp.mm_mos_1.duration));}else{$(this).animate({right:(placement-mrm.cmp.mm_mos_1.width)+'px'},{duration:mrm.cmp.mm_mos_1.duration},window.setTimeout("mrm.cmp.mm_mos_1.bind()",mrm.cmp.mm_mos_1.duration));}});mrm.cmp.mm_mos_1.pos++;}},prev:function(){mrm.util.log('[mrm.cmp.mm_mos_1.prev]');mrm.cmp.mm_mos_1.state(mrm.cmp.mm_mos_1.pos-1);if(mrm.cmp.mm_mos_1.pos>0){mrm.cmp.mm_mos_1.unbind();var $elm=$('.mm_mos_1 li');$elm.each(function(){var placement=parseInt($(this).css(cssPlacement));if(cssPlacement==='left'){$(this).animate({left:(placement+mrm.cmp.mm_mos_1.width)+'px'},{duration:mrm.cmp.mm_mos_1.duration},window.setTimeout("mrm.cmp.mm_mos_1.bind()",mrm.cmp.mm_mos_1.duration));}else{$(this).animate({right:(placement+mrm.cmp.mm_mos_1.width)+'px'},{duration:mrm.cmp.mm_mos_1.duration},window.setTimeout("mrm.cmp.mm_mos_1.bind()",mrm.cmp.mm_mos_1.duration));}});mrm.cmp.mm_mos_1.pos--;}},init:function(c){mrm.util.log('[mrm.cmp.mm_mos_1] Context: '+c);mrm.cmp.mm_mos_1.width=$('.mm_mos_1 ul').width()+1;if($('.mm_mos_1 li.active').length>0){}else{$('.mm_mos_1 li:eq(0)').addClass('active');}
var $elm=$('.mm_mos_1 li');var i=0;$elm.each(function(){var ii=i;$(this).css(cssPlacement,(ii*mrm.cmp.mm_mos_1.width-1)+'px');i++;});$('.mm_mos_1 ul',c).css('overflow','hidden');mrm.cmp.mm_mos_1.bind();mrm.cmp.mm_mos_1.state(mrm.cmp.mm_mos_1.pos);}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{mm_video_1:{tpl:['07'],playerReady:function(player){mrm.util.log('[mrm.cmp.mm_video_1.playerReady] - player_object '+player);player=swfobject.getObjectById(player);actual_item=0;amount_of_items=$('div.mm_video_1 ul.gallery li').length;items=new Array();$('div.mm_video_1 ul.gallery li a').each(function(i){items[i]=new Object();items[i]["src"]=$(this).attr('rel');$(this).click(function(){actual_item=i;mrm.cmp.mm_video_1.new_stage_item(player);});$(this).parent().click(function(){actual_item=i;mrm.cmp.mm_video_1.new_stage_item(player);});});$('div.mm_video_1 ul.functions a.next').click(function(){mrm.cmp.mm_video_1.new_stage_item(player,'next');}).css('cursor','pointer');$('div.mm_video_1 ul.functions a.prev').click(function(){mrm.cmp.mm_video_1.new_stage_item(player,'prev');}).css('cursor','pointer');},new_stage_item:function(player,step){if(typeof(step)!="undefined"){switch(step){case"next":actual_item=(actual_item<amount_of_items-1)?actual_item+1:0;break;case"prev":actual_item=(actual_item>0)?actual_item-1:amount_of_items-1;break;}}
if(typeof(player)!="undefined"&&typeof(player.sendEvent)!="undefined"){mrm.util.log('[player.sendEvent]');player.sendEvent('LOAD',items[actual_item]["src"]);player.sendEvent('PLAY');$('div.mm_video_1 ul.gallery li').removeClass('active').eq(actual_item).addClass('active');mrm.util.log('[mrm.cmp.mm_video_1.new_stage_item] '+actual_item);}else{if(typeof(player)=="undefined")mrm.util.error('[mm_video_1] player undefined');if(typeof(player.sendEvent)=="undefined")mrm.util.error('[mm_video_1] player.sendEvent undefined');}},fixSafari:function(){$('.video').find('object:last').attr("id","mm_video_1");var safObj=$('.video').find('object:last');$('.video').children('object:first').remove();$('.video').append(safObj);},init:function(c){mrm.util.log('[mrm.cmp.mm_video_1] Context: '+c);if(navigator.userAgent.indexOf('Safari')>-1){mrm.cmp.mm_video_1.fixSafari();}
$('div.mm_video_1 ul.gallery li a').click(function(){return false;});}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{nav_tablay_1:{tpl:['03','05','06','08','09','10','12','13'],init:function(c){if(!mrm.util.ie6()){mrm.util.log('[mrm.cmp.nav_tablay_1] Context: '+c);$('.nav_tablay_1').tabs({selected:0});$('.nav_tablay_1 li.active').removeClass('active');}}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{seo_text:{tpl:['02','06'],init:function(c){mrm.util.log('[mrm.cmp.seo_text] Context: '+c);$('div.seo_text dl').accordion({collapsible:true,autoHeight:false,active:false});}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{ut_ln_1:{tpl:['05','08','10','13','14','16','17'],init:function(c){mrm.util.log('[mrm.cmp.ut_ln_1] Context: '+c);$('.ut_ln_1 li.print a').click(function(){window.print();return false;});$('#mds-app-byo .ut_ln_1 li.print a:visible').livequery('click',function(){window.print();return false;});}}});})(mrm.$);;(function($){var trimArray=new Array();var links=new Array();var prices=new Array();var priceRow=false;var hashtag=null;var maxCount=4;var trimNames=new Array();var trimChangedAfterKeyDown=false;mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{cnt_tbl_fs_1:{tpl:['10','16'],init:function(c){mrm.util.log('[mrm.cmp.cnt_tbl_fs_1] Context: '+c);if(document.URL.split('#')[1]){hashtag=document.URL.split('#')[1];}
$('.cnt_tbl_fs_1').each(function(i){$(this).attr("id","cnt_tbl_fs_1_table_"+i);});$('.ui-tabs-nav').each(function(i){if(!$(this).parent().parent().hasClass('cnt_tbl_fs_1')){$(this).children('li:first').addClass("clickedbefore");mrm.cmp.cnt_tbl_fs_1.setLayerButtonFunction($(this));}});$('ul.ui-tabs-nav a.fsShowAll').unbind();$('.cnt_tbl_fs_1').each(function(i){$('#cnt_tbl_fs_1_table_'+i).find('ul.ui-tabs-nav a.fsShowAll').bind('click',function(){$('#cnt_tbl_fs_1_table_'+i).find('tbody').removeClass('ui-tabs-hide');$(this).parent().siblings().removeClass('ui-tabs-selected');$(this).parent().addClass('ui-tabs-selected');});});$('.cnt_tbl_fs_1:visible').each(function(i){var trimCount=$(this).find('tbody:first').find('tr:first').children('th').length-1;if(trimCount>maxCount){mrm.cmp.cnt_tbl_fs_1.start($(this));}});},start:function(table)
{mrm.cmp.cnt_tbl_fs_1.priceRow(table);mrm.cmp.cnt_tbl_fs_1.buildTrims(table);mrm.cmp.cnt_tbl_fs_1.setDropdown(table);mrm.cmp.cnt_tbl_fs_1.checkTrimCount(table);},priceRow:function(table)
{if(table.find('tfoot').find('tr').length>1)
priceRow=true;},setLayerButtonFunction:function(tabNav){tabNav.find('a').each(function(i){$(this).click(function(){if($(this).parent().hasClass("clickedbefore")){}else{$('div.cnt_tbl_fs_1:visible').each(function(i){var trimCount=$(this).find('tbody:first').find('tr:first').children('th').length-1;if(trimCount>maxCount){mrm.cmp.cnt_tbl_fs_1.start($(this));}});$(this).parent().addClass("clickedbefore");}});});},buildTrims:function(table){trimArray[table.attr('id')]=new Array();table.find('tbody').each(function(i){var k=0;trimArray[table.attr('id')][i]=new Array();$(this).find('tr:first').find('th').each(function(j){if(j>0){trimArray[table.attr('id')][i][k]=new Array();k++;}});});table.find('tbody').each(function(i){$(this).children('tr').not('.thead').each(function(j){$(this).find("td").each(function(k){trimArray[table.attr('id')][i][k][j]=$(this).html();});});});},setDropdown:function(table){if(table.find('tbody').find('tr:first').children('th').length-1>maxCount&&table.find('select').length<=0){if(table.find('table:first').find('thead').length<=0){table.find('table:first').children().eq(0).before('<thead></thead>');}
table.find('thead:first').prepend("<tr class='selects'><th>&nbsp;</th><th><select></select></th><th><select></select></th><th><select></select></th></tr>");var trimnames=mrm.cmp.cnt_tbl_fs_1.getTrimNames(table);mrm.util.fillSelect(table.find('tr.selects select'),trimnames);}
mrm.cmp.cnt_tbl_fs_1.setDropdownFunctionality(table);},getTrimNames:function(table){var result=new Array();links[table.attr('id')]=new Array();prices[table.attr('id')]=new Array();result.push("&nbsp;");trimNames[table.attr('id')]=new Array();var j=0;table.find('tbody:first .thead th').each(function(i){if(i!=0){if((i<table.find('tbody:first .thead th').length)&&(table.find('tfoot').find('td').find('a').length>0)){if(priceRow)
{prices[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=table.find('tfoot').find('tr:eq(0)').find('td:eq('+j+')').html();links[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=table.find('tfoot').find('tr:eq(1)').find('td:eq('+j+')').html();}
else
{links[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=table.find('tfoot').find('td:eq('+j+')').find('a').parent().html();}
if(navigator.userAgent.indexOf('MSIE 6')>0){links[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=links[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()].replace('<SPAN>','<SPAN class=" ie7_class85 ie7_class297">');if(priceRow)
prices[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=prices[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()].replace('<SPAN>','<SPAN class=" ie7_class85 ie7_class297">');}}
if(j>=0){result.push($(this).text());trimNames[table.attr('id')][table.find('tbody:first .thead th:eq('+(j+1)+')').text()]=$(this).html();}
j++;}});return result;},checkTrimCount:function(table){var trimCount=table.find('tbody:first .thead').children('th').length-1;if(trimCount>maxCount){mrm.cmp.cnt_tbl_fs_1.showOnly(table,'thead',4);mrm.cmp.cnt_tbl_fs_1.showOnly(table,'tbody',3);mrm.cmp.cnt_tbl_fs_1.showOnly(table,'tfoot',3);mrm.cmp.cnt_tbl_fs_1.emptyCol(table,3);mrm.cmp.cnt_tbl_fs_1.setDefaultTrims(table);}},showOnly:function(table,selector,count){table.find(selector).find('tr').each(function(i){$(this).children().each(function(j){if(j>count){$(this).addClass("unvisible");}});});},emptyCol:function(table,col){table.find('tbody').find('tr').each(function(){if((!$(this).find('td:eq('+(col-1)+')').attr('colspan'))||($(this).find('td:eq('+(col-1)+')').attr('colspan')==1)){$(this).find('td:eq('+(col-1)+')').html("");}});table.find('tbody').each(function(){$(this).find('.thead').children().each(function(i){if(i==col){$(this).html("");}});});table.find('tfoot').find('tr').each(function(){mrm.$(this).find('td').each(function(i){if(i==col-1){mrm.$(this).html('');}});});},setDefaultTrims:function(table){var defaultFirstSelIndex=1;var colValue=1;if(hashtag!=null){table.find('.thead:first').children('th').each(function(i){if($(this).attr('class').indexOf(hashtag)>=0){defaultFirstSelIndex=i;}});}
table.find('select').each(function(i){if(i==0){$(this).find('option:eq('+defaultFirstSelIndex+')').attr("selected","selected");}
if(i==1){$(this).find('option:eq(2)').attr("selected","selected");}});table.find('.thead').find('th:eq(1)').html(trimNames[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,1)]);table.find('.thead').find('th:eq(2)').html(trimNames[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,2)]);if(table.find('tfoot').find('td').find('a').length>0){if(priceRow)
{table.find('tfoot').find('tr:eq(0)').find('td:eq(0)').html('');table.find('tfoot').find('tr:eq(1)').find('td:eq(0)').html('');table.find('tfoot').find('tr:eq(0)').find('td:eq(0)').append(prices[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,1)]);table.find('tfoot').find('tr:eq(1)').find('td:eq(0)').append(links[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,1)]);table.find('tfoot').find('tr:eq(0)').find('td:eq(1)').html('');table.find('tfoot').find('tr:eq(1)').find('td:eq(1)').html('');table.find('tfoot').find('tr:eq(0)').find('td:eq(1)').append(prices[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,2)]);table.find('tfoot').find('tr:eq(1)').find('td:eq(1)').append(links[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,2)]);}
else
{table.find('tfoot').find('td:eq(0)').find('a').remove();table.find('tfoot').find('td:eq(0)').append(links[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,1)]);table.find('tfoot').find('td:eq(1)').find('a').remove();table.find('tfoot').find('td:eq(1)').append(links[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,2)]);}}
mrm.cmp.cnt_tbl_fs_1.fillTrim(table,1,defaultFirstSelIndex,false);mrm.cmp.cnt_tbl_fs_1.fillTrim(table,2,2,false);mrm.cmp.cnt_tbl_fs_1.resetDropdownValue(table,0);mrm.cmp.cnt_tbl_fs_1.resetDropdownValue(table,1);},getSelected:function(table,select){select--;var result="";table.find('select:eq('+select+')').children().each(function(){if($(this).attr('selected')){result=$(this).text();}});return result;},getSelectedValue:function(table,index){var result="";table.find('select:eq('+index+')').children().each(function(){if($(this).attr('selected')){result=$(this).attr('value');}});return result;},fillTrim:function(table,col,trim,fade){table.find('tbody').each(function(i){$(this).find('tr').not('.thead').each(function(j){$(this).children('td').each(function(k){if(k==col-1){if(trim>0){if(fade){mrm.cmp.cnt_tbl_fs_1.fadeout($(this),trimArray[table.attr('id')][trim-1][i]);}else{$(this).html(trimArray[table.attr('id')][i][trim-1][j]);}}else{if((!$(this).attr('colspan'))||($(this).attr('colspan')==1)){$(this).html("");}}}});});});},setDropdownFunctionality:function(table){table.find('select').each(function(j){$(this).bind('change',function(ev){var i=$(ev.target).find('option[selected]').attr('value');mrm.cmp.cnt_tbl_fs_1.fillAfterChange(table,i,j);});});},fillAfterChange:function(table,i,j){mrm.cmp.cnt_tbl_fs_1.fillTrim(table,j+1,mrm.cmp.cnt_tbl_fs_1.getSelectedValue(table,j),false);if(trimNames[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,j+1)])
{table.find('.thead').find('th:eq('+(j+1)+')').html(trimNames[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,j+1)]);table.find('tfoot').find('tr').each(function(i){if(i==0&&priceRow){mrm.$(this).find('td:eq('+j+')').html('');mrm.$(this).find('td:eq('+j+')').html(prices[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,j+1)]);}else{mrm.$(this).find('td:eq('+j+')').html('');mrm.$(this).find('td:eq('+j+')').html(links[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,j+1)]);}});}else{mrm.cmp.cnt_tbl_fs_1.emptyCol(table,j+1);}},resetDropdownValue:function(table,selectIndex){var selHTML=null;table.find('select:eq('+selectIndex+')').children().each(function(i){if($(this).attr('selected')){table.find('.selectedTxt:eq('+selectIndex+')').html(trimNames[table.attr('id')][mrm.cmp.cnt_tbl_fs_1.getSelected(table,i)]);selHTML=$(this).text();}});table.find('ul.newList:eq('+selectIndex+')').children().removeClass('hiLite');table.find('ul.newList:eq('+selectIndex+')').find('li').each(function(i){if($(this).html()==selHTML){$(this).addClass('hiLite');$(this).setSelectedOptions(selectIndex,i);}});},renewTrimAfterKeyDown:function(table,i,selectIndex){if(trimChangedAfterKeyDown){mrm.cmp.cnt_tbl_fs_1.fillAfterChange(table,i,selectIndex);trimChangedAfterKeyDown=false;}else{window.setTimeout(function(){mrm.cmp.cnt_tbl_fs_1.renewTrimAfterKeyDown(table,i,selectIndex);},100);}},setTrimVarAfterKeyDown:function(){trimChangedAfterKeyDown=true;},fadeout:function(el,value){el.fadeOut("slow",mrm.cmp.cnt_tbl_fs_1.setValues(el,value));},setValues:function(el,value){el.html("test");mrm.cmp.cnt_tbl_fs_1.fadein(el);},fadein:function(el){el.show(500);}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{searchform:{init:function(c){mrm.util.log('[searchform] Context: '+c);mrm.util.clearInput('#searchterm',$('#searchterm').attr('value'));}}});})(mrm.$);;(function($){mrm.scrollbars={remove:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';mrm.util.log('[mrm.scrollbars.remove] Context: '+c);$(c).jScrollPaneRemove();},reinitialiseScrollPane:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';mrm.util.log('[mrm.scrollbars.reinitialiseScrollPane] Context: '+c);$(c).jScrollPane({scrollbarWidth:17,showArrows:true,select:false,scrollbarMargin:0,isSelect:false});},reinit:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';mrm.util.log('[mrm.scrollbars.reinit] Context: '+c);$(c).jScrollPane({scrollbarWidth:17,showArrows:true,select:false,scrollbarMargin:0,isSelect:false});},init:function(c){mrm.util.log('[mrm.scrollbars] Context: '+c);$('#container form div.selectbox-wrapper, #citySelection, #mds-app-dl #dl2a .pf2b, #mds-app-dl #dl2b .pf2b, #mds-app-dl #dr2 .pf2b').addClass('scroll-pane');$('.scroll-pane').jScrollPane({scrollbarWidth:17,showArrows:true,select:false,scrollbarMargin:0,isSelect:false});$('li.ui-state-error').each(function(){$(this).children('.jScrollPaneContainer').addClass('ui-state-error');});$('#mds-tpl-16 #mds-app-dl #paging').click(function(){mrm.scrollbars.reinitialiseScrollPane();});}};})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{equalHeights:{tpl:['01'],init:function(c){mrm.util.log('[mrm.cmp.equalHeights] Context: '+c);$('.ts_lang_1 > div > .fck_authorsinput > p').equalHeights();$('.ts_lang_1 > div > .fck_authorsinput > .ll').equalHeights();}}});})(mrm.$);;(function($){mrm.cmp=mrm.cmp||{};$.extend(mrm.cmp,{t17_close_window:{tpl:['17'],init:function(c){mrm.util.log('[mrm.cmp.t17_close_window] Context: '+c);$('#mds-tpl-17 div.cnt_btn_1:first').click(function(){window.close();});}}});})(mrm.$);;(function($){mrm.init={all:function(c){if($(c).html()){mrm.util.log('[init.all] Context: '+c);mrm.util.initAll(mrm,c);}}};$(document).ready(function(){mrm.util.copyright();mrm.util.log('[System] '+mrm.util.getLang('language')+mrm.util.getLang('sys_language'));mrm.init.all('body');});})(mrm.$);