(function($){var b=navigator.userAgent,v=parseInt(navigator.appVersion);if(b.indexOf('Mozilla')!=-1&&b.indexOf('WebKit')==-1&&v>=5){$('head').append('<link rel="stylesheet" href="assets/templates/flex/style/moz.css" type="text/css" media="screen" />')}if(b.indexOf('WebKit')!=-1&&v>=5){$('head').append('<link rel="stylesheet" href="assets/templates/flex/style/webkit.css" type="text/css" media="screen" />')}$.fLayout=function(){$('#snarrow').attr('disabled',function(){var det_width=b.indexOf('MSIE 6')==-1?$('#details_1').attr('offsetWidth'):$('#details_1').attr('offsetWidth')+$('#compact_1').attr('offsetWidth'),ref_width=Math.round($('#mark').attr('offsetWidth')/40);return det_width>ref_width?'disabled':''});$('#up').css('display',function(){return $('body').attr('scrollHeight')>$(window).height()?'block':'none'})};$.fAltStyle=function(sheet){$('body').toggle();$('link[rel*=stylesheet][title]').each(function(i){this.setAttribute('rel','alternate stylesheet');this.disabled=true;if(this.title==sheet){this.disabled=false;this.setAttribute('rel','stylesheet')}});$('body').toggle();$.cookie('cust_style',sheet,{expires:'7'})};$(document).ready(function(){var aSheets=$('link[rel=stylesheet][id]');if(aSheets.length){aSheets.each(function(){this.disabled=true})}$.fLayout();if($.cookie('cust_style'))$.fAltStyle($.cookie('cust_style'));else $.fAltStyle('dunkel');$.jqem.bind(function(){if($.jqem.current()!=$.jqem.previous()){$.fLayout()}});$(window).resize(function(){$.fLayout()});$('.alt_style').mouseup(function(){$.fAltStyle(this.getAttribute('id'));return false})});})(jQuery);
