	$(document).ready(function() {
			
			$('.slider h2').click(function(e) {
				e.preventDefault();
				if($(this).next().css('display') == 'none'){
					$(this).next().slideDown('normal');
					$(this).css('background-position','0px -43px');
				}
				else{
					$(this).next().slideUp('normal');
					$(this).css('background-position','0 0');
				}
				return false;
			});
		
			
			$('.close').click(function(e) {
				e.preventDefault();
				$('#content').fadeOut('normal', function(){
					
					$('html').css('overflow','hidden');
					$('#smallcontent').fadeIn('normal');
					$('#leftline').fadeIn('normal');
					bmelv_resizer();
				});
				return false;
			});
			
			$('.open').click(function(e) {
				e.preventDefault();
				$('#leftline').fadeOut('normal');
				$('#smallcontent').fadeOut('normal', function(){
					$('#content').fadeIn('normal');
					$('html').css('overflow','auto');	
				});
				return false;
			});
			
			$('.font').click(function(e) {
				e.preventDefault();
				font_switcher(this.getAttribute('rel'));
				return false;
			});
			
			function font_switcher(target) {
					$('link[@rel*=style][title]').each(function(i) {
						this.disabled = true;
						if (this.getAttribute('title') == target) 
							this.disabled = false;
					});
			}

			bmelv_resizer();
			$(window).resize(bmelv_resizer);
			function bmelv_resizer(){

		        var content_left = parseInt($('html').css('width'))/2 - parseInt($('#box').css('width'))/2;
		        $('#box').css('left',content_left);
		
		        $('#logo').css('left',content_left); //ie fix
		
		        var cssData = {
		                'width': 	content_left  + parseInt($('#smallcontent').css('left')) + 10,
		                'top': 		parseInt($('#smallcontent').css('top')) + 50
		              }

		        $('#leftline').css(cssData);
			}
		});