/* 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($){$.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($){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);if(mrm.util.ie()){$('div.nav_extended_1 > ul li:last-child, div.nav_tablay_1 > ul li:last-child').addClass('lastChild');$('div.nav_extended_1 > ul li.active:last-child, div.nav_tablay_1 > ul li.active:last-child').addClass('activelastChild');$('div.nav_footer_c1_row2 > ul li:last-child').addClass('lastChild');}}}});})(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($){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.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 call_brochure(){getGmdsCmsLinks().openCmsPage(GmdsCmsLinks.REQUEST_A_BROCHURE,{});}
function call_testdrive(){getGmdsCmsLinks().openCmsPage(GmdsCmsLinks.REQUEST_A_TEST_DRIVE,{});};(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.$);