	/* Determine scroll  */
	function getScrollXY() {
	  var scrOfX = 0, scrOfY = 0;
	  if( typeof( window.pageYOffset ) == 'number' ) {
	    //Netscape compliant
	    scrOfY = window.pageYOffset;
	    scrOfX = window.pageXOffset;
	  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	    //DOM compliant
	    scrOfY = document.body.scrollTop;
	    scrOfX = document.body.scrollLeft;
	  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	    //IE6 standards compliant mode
	    scrOfY = document.documentElement.scrollTop;
	    scrOfX = document.documentElement.scrollLeft;
	  }
	  return {scrX: scrOfX, scrY: scrOfY };
	}
	
	
	
	/*  Determine the user's window width and height  */
	function width_height() {      
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    w = window.innerWidth;
	    h = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    w = document.documentElement.clientWidth;
	    h = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    w = document.body.clientWidth;
	    h = document.body.clientHeight;
	  }
	 // w = $(window).width();    /* Ширина экрана на момент загрузки страницы */
	 // h = $(window).height();   /* Высота экрана на момент загрузки страницы */
	  return {width: w, height: h}; 
	}
	
	function arrow()  {			// Убираем стрелки прокрутки, если некуда крутить
		var left_pos = $("#slider").css('left');
		var new_left = /^-?\d+/.exec(left_pos);
		if (new_left) { 
		
		var last_position = $("#thumb-last").css('left');
		var last_position1 = $("#thumb1-last").css('left');
		var last_position2 = $("#thumb2-last").css('left');
		var last_position3 = $("#thumb3-last").css('left');
		var last_position4 = $("#thumb4-last").css('left');
		
		if (last_position) last_pos = last_position;
		if (last_position1) last_pos = last_position1;
		if (last_position2) last_pos = last_position2;
		if (last_position3) last_pos = last_position3;
		if (last_position4) last_pos = last_position4;
		
		var last = /^-?\d+/.exec(last_pos);
		
		if (last<470) {$("#nav-right").css({backgroundImage: "url('images/p_but_right_stopped.jpg')"});
					   $("#nav-left").css({backgroundImage: "url('images/p_but_left_stopped.jpg')"});
		 				return false; }
		
		if (parseInt(new_left) > -1) { $("#nav-right").css({backgroundImage: "url('images/p_but_right_stopped.jpg')"}); return false; } 
		
		var dx = parseInt(new_left) + parseInt(last);
		if (dx < 511)  { $("#nav-left").css({backgroundImage: "url('images/p_but_left_stopped.jpg')"}); return false; }
		}
	} 

		var month = new Array;
			month[1] = "k_img1.jpg";
			month[2] = "k_img2.jpg";
			month[3] = "k_img3.jpg";
			month[4] = "k_img4.jpg";
			month[5] = "k_img5.jpg";
			month[6] = "k_img6.jpg";
			month[7] = "k_img7.jpg";
			month[8] = "k_img8.jpg";
			month[9] = "k_img9.jpg";
			month[10] = "k_img10.jpg";
			month[11] = "k_img11.jpg";
			month[12] = "k_img12.jpg";
			month[13] = "k_img13.jpg";



	 /* Placing objects when onload event takes place */
	$("body").ready(function() {  
		
		var url = document.location.href;
		var page_url = /[^/]*$/.exec(url);
		var page_hilight11 = false;
		var page_hilight12 = false;
		var page_hilight13 = false;
		var page_hilight14 = false;
		var page_hilight15 = false;
		
		if (page_url == "portfolio.html")         { $("#item11").css({backgroundImage: "url('images/p_sub_corporate_over.jpg')"}); page_hilight11 = true; }
		if (page_url == "portfolio_ceramic.html") { $("#item12").css({backgroundImage: "url('images/p_sub_ceramik_over.jpg')"});   page_hilight12 = true; }
		if (page_url == "portfolio_stone.html")   { $("#item13").css({backgroundImage: "url('images/p_sub_stone_over.jpg')"});     page_hilight13 = true; }
		if (page_url == "portfolio_leather.html") { $("#item14").css({backgroundImage: "url('images/p_sub_leather_over.jpg')"});   page_hilight14 = true; }
		if (page_url == "portfolio_clock.html")   { $("#item15").css({backgroundImage: "url('images/p_sub_clock_over.jpg')"});     page_hilight15 = true; } 
		
		
		arrow();
	
		mh = $("#maindiv").height();   //  Рассчитываем высоту основного дива
		h = mh + 125 + 15;    
		$("#maindiv").css('height', h); 
		
		$(".list").mouseover(function(){    
			var a = $(this).attr('id');
				if (a == "item1") { $("#item1").css({backgroundImage: "url('images/sub_suvenir_over.jpg')"});   $("#item-image img").attr({src: "images/left_img1.jpg", name: 1});  }
				if (a == "item2") { $("#item2").css({backgroundImage: "url('images/sub_corporate_over.jpg')"}); $("#item-image img").attr({src: "images/left_img2.jpg", name: 2});  }
				if (a == "item3") { $("#item3").css({backgroundImage: "url('images/sub_ceramik_over.jpg')"});   $("#item-image img").attr({src: "images/left_img3.jpg", name: 3});  }
				if (a == "item4") { $("#item4").css({backgroundImage: "url('images/sub_stone_over.jpg')"});     $("#item-image img").attr({src: "images/left_img4.jpg", name: 4});  }
				if (a == "item5") { $("#item5").css({backgroundImage: "url('images/sub_leather_over.jpg')"});   $("#item-image img").attr({src: "images/left_img5.jpg", name: 5});  }
				if (a == "item6") { $("#item6").css({backgroundImage: "url('images/sub_clock_over.jpg')"});     $("#item-image img").attr({src: "images/left_img6.jpg", name: 6});  }
				
				if (a == "item11" && page_hilight11 == false)  $("#item11").css({backgroundImage: "url('images/p_sub_corporate_over.jpg')"}); 
				if (a == "item12" && page_hilight12 == false)  $("#item12").css({backgroundImage: "url('images/p_sub_ceramik_over.jpg')"}); 
				if (a == "item13" && page_hilight13 == false)  $("#item13").css({backgroundImage: "url('images/p_sub_stone_over.jpg')"});  
				if (a == "item14" && page_hilight14 == false)  $("#item14").css({backgroundImage: "url('images/p_sub_leather_over.jpg')"}); 
				if (a == "item15" && page_hilight15 == false)  $("#item15").css({backgroundImage: "url('images/p_sub_clock_over.jpg')"});  
			return false;
		});
		
		$(".list").mouseout(function(){    
			var a = $(this).attr('id');
				if (a == "item1")  $("#item1").css({backgroundImage: "url('images/sub_suvenir.jpg')"});      
				if (a == "item2")  $("#item2").css({backgroundImage: "url('images/sub_corporate.jpg')"});    
				if (a == "item3")  $("#item3").css({backgroundImage: "url('images/sub_ceramik.jpg')"});      
				if (a == "item4")  $("#item4").css({backgroundImage: "url('images/sub_stone.jpg')"});       
				if (a == "item5")  $("#item5").css({backgroundImage: "url('images/sub_leather.jpg')"});     
				if (a == "item6")  $("#item6").css({backgroundImage: "url('images/sub_clock.jpg')"});   
				
				if (a == "item11" && page_hilight11 == false)  $("#item11").css({backgroundImage: "url('images/p_sub_corporate.jpg')"}); 
				if (a == "item12" && page_hilight12 == false)  $("#item12").css({backgroundImage: "url('images/p_sub_ceramik.jpg')"}); 
				if (a == "item13" && page_hilight13 == false)  $("#item13").css({backgroundImage: "url('images/p_sub_stone.jpg')"});  
				if (a == "item14" && page_hilight14 == false)  $("#item14").css({backgroundImage: "url('images/p_sub_leather.jpg')"}); 
				if (a == "item15" && page_hilight15 == false)  $("#item15").css({backgroundImage: "url('images/p_sub_clock.jpg')"});    
			return false;
		});
		
		$(".list").click(function(){    
			var a = $(this).attr('id');
				if (a == "item1") window.open("portfolio.html", "_self");
				if (a == "item2") window.open("portfolio.html", "_self");
				if (a == "item3") window.open("portfolio_ceramic.html", "_self");  
				if (a == "item4") window.open("portfolio_stone.html", "_self");   
				if (a == "item5") window.open("portfolio_leather.html", "_self");  
				if (a == "item6") window.open("portfolio_clock.html", "_self");
			
			
				if (a == "item11") window.open("portfolio.html", "_self");  
				if (a == "item12") window.open("portfolio_ceramic.html", "_self");  
				if (a == "item13") window.open("portfolio_stone.html", "_self");   
				if (a == "item14") window.open("portfolio_leather.html", "_self");  
				if (a == "item15") window.open("portfolio_clock.html", "_self"); 
			
			return false;
		});
		
		$("#item-image img").click(function(){    
			var a = $(this).attr('name');
				if (a == "1") window.open("portfolio.html", "_self");
				if (a == "2") window.open("portfolio.html", "_self");
				if (a == "3") window.open("portfolio_ceramic.html", "_self");  
				if (a == "4") window.open("portfolio_stone.html", "_self");   
				if (a == "5") window.open("portfolio_leather.html", "_self");  
				if (a == "6") window.open("portfolio_clock.html", "_self");
		});
		
		$(".subm").click(function(){    
			var a = $(this).attr('id');
				if (a == "submenu1") window.open("index.html", "_self");
				if (a == "submenu2") window.open("creative.html", "_self");
				if (a == "submenu3") window.open("portfolio.html", "_self");
			return false;
		});
		
		$(".fun").mouseover(function(){  
			$("#dev").text("куём сайты!").css({marginLeft: '159px' });
			window.setTimeout( "$('#dev').text('разработка сайта ').css({marginLeft: '125px'});", 1500);
			return false;
		});
		
		$(".fun").click(function(){  
			window.open("http://www.newmental.ru", "_blank");
			return false;
		});
		
		$("#decorarion2").click(function(){
		
			location.href="ambar.html"; 
		  
			/* $("#not").css({display: 'block', opacity: 1});
			window.setTimeout( "$('#not').animate({opacity: 0}, 500)", 1500);
			return false; */
		});
		
		$(".map").click(function(){  
			$("#map, #modal-map").css({display: 'block'});
			return false;
		});
		
		$("#map-close").click(function(){  
			$("#map, #modal-map").css({display: 'none'});
			return false;
		});
		
		$("#header1-left").click(function(){  
			window.open("index.html", "_self");
			return false;
		});
		
		$("#copy").click(function(){  
			window.open("secret/index.html", "_self");
			return false;
		});
		
		$("#nav-left").click(function(){  
		
			$("#nav-right").css({backgroundImage: "url('images/p_but_right.jpg')"});
			var left_pos = $("#slider").css('left');
			var new_left = /^-?\d+/.exec(left_pos);
			
			var last_position = $("#thumb-last").css('left');
			var last_position1 = $("#thumb1-last").css('left');
			var last_position2 = $("#thumb2-last").css('left');
			var last_position3 = $("#thumb3-last").css('left');
			var last_position4 = $("#thumb4-last").css('left');
			
			if (last_position) last_pos = last_position;
			if (last_position1) last_pos = last_position1;
			if (last_position2) last_pos = last_position2;
			if (last_position3) last_pos = last_position3;
			if (last_position4) last_pos = last_position4;
			
			var last = /^-?\d+/.exec(last_pos);
			
			var dx = parseInt(new_left) + parseInt(last);
			
			if (dx < 511)  return false; 
			new_left = parseInt(new_left) - 97;
			
			dx = parseInt(new_left) + parseInt(last);
			if (dx < 511)  $(this).css({backgroundImage: "url('images/p_but_left_stopped.jpg')"});
			//alert(dx);
			$("#slider").animate({left: new_left}, 500);
			return false;
		});
		
		$("#nav-right").click(function(){  
			$("#nav-left").css({backgroundImage: "url('images/p_but_left.jpg')"});
			var left_pos = $("#slider").css('left');
			var new_left = /^-?\d+/.exec(left_pos);
			//alert(new_left);
			if (parseInt(new_left) > -1)  return false;  
			new_left = parseInt(new_left) + 97;
			
			if (parseInt(new_left) > -1)  $(this).css({backgroundImage: "url('images/p_but_right_stopped.jpg')"});
			$("#slider").animate({left: new_left}, 500);
			return false;
		});
		
		$("#nav-right").mouseup(function(){
			var bgi = $(this).css('backgroundImage');
			if (bgi != "none")  
		      $(this).css({backgroundImage: "url('images/p_but_right.jpg')"});
		    }).mousedown(function(){
	    	var bgi1 = $(this).css('backgroundImage');
			if (bgi1 != "none")					
		      $(this).css({backgroundImage: "url('images/p_but_right_press.jpg')"});
		    });
		    
		$("#nav-left").mouseup(function(){
			var bgi = $(this).css('backgroundImage');
			if (bgi != "none")  
		      $(this).css({backgroundImage: "url('images/p_but_left.jpg')"});
		    }).mousedown(function(){
	    	var bgi1 = $(this).css('backgroundImage');
			if (bgi1 != "none")					
		      $(this).css({backgroundImage: "url('images/p_but_left_press.jpg')"});
		    });    
		
		
		$(".thumb").click(function(){   
			var a = $(this).attr('id');
				if (a == "thumb1") {$("#img-place img").attr({src: "pictures/corporate_img1.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt1.png')"}); }
				if (a == "thumb2") {$("#img-place img").attr({src: "pictures/corporate_img2.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt2.png')"}); }
				if (a == "thumb3") {$("#img-place img").attr({src: "pictures/corporate_img3.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt3.png')"}); }
				if (a == "thumb4") {$("#img-place img").attr({src: "pictures/corporate_img4.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt4.png')"}); }
				if (a == "thumb5") {$("#img-place img").attr({src: "pictures/corporate_img5.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt5.png')"}); }
				if (a == "thumb6") {$("#img-place img").attr({src: "pictures/corporate_img6.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt6.png')"}); }
				if (a == "thumb7") {$("#img-place img").attr({src: "pictures/corporate_img7.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt7.png')"}); }
				if (a == "thumb8") {$("#img-place img").attr({src: "pictures/corporate_img8.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt8.png')"}); }
				if (a == "thumb9") {$("#img-place img").attr({src: "pictures/corporate_img9.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt9.png')"}); }
				if (a == "thumb10") {$("#img-place img").attr({src: "pictures/corporate_img10.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt10.png')"}); }
				if (a == "thumb11") {$("#img-place img").attr({src: "pictures/corporate_img11.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt11.png')"}); }
				if (a == "thumb12") {$("#img-place img").attr({src: "pictures/corporate_img12.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt12.png')"}); }
				if (a == "thumb13") {$("#img-place img").attr({src: "pictures/corporate_img13.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt13.png')"}); }
				if (a == "thumb14") {$("#img-place img").attr({src: "pictures/clock_img4.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/clock_txt4.png')"}); }
				if (a == "thumb15") {$("#img-place img").attr({src: "pictures/clock_img5.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/clock_txt5.png')"}); }
				if (a == "thumb-last") {$("#img-place img").attr({src: "pictures/corporate_img14.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/corporate_txt14.png')"}); }
				
				if (a == "thumb1-1") {$("#img-place img").attr({src: "pictures/ceramik_img1.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt1.png')"}); }
				if (a == "thumb1-2") {$("#img-place img").attr({src: "pictures/ceramik_img2.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt2.png')"}); }
				if (a == "thumb1-3") {$("#img-place img").attr({src: "pictures/ceramik_img3.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt3.png')"}); }
				if (a == "thumb1-4") {$("#img-place img").attr({src: "pictures/ceramik_img4.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt4.png')"}); }
				if (a == "thumb1-5") {$("#img-place img").attr({src: "pictures/ceramik_img5.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt5.png')"}); }
				if (a == "thumb1-6") {$("#img-place img").attr({src: "pictures/ceramik_img6.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt6.png')"}); }
				if (a == "thumb1-7") {$("#img-place img").attr({src: "pictures/ceramik_img7.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt7.png')"}); }
				if (a == "thumb1-8") {$("#img-place img").attr({src: "pictures/ceramik_img8.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt8.png')"}); }
				if (a == "thumb1-9") {$("#img-place img").attr({src: "pictures/ceramik_img9.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt9.png')"}); }
				if (a == "thumb1-10") {$("#img-place img").attr({src: "pictures/ceramik_img10.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt10.png')"}); }
				if (a == "thumb1-11") {$("#img-place img").attr({src: "pictures/ceramik_img11.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt11.png')"}); }
				if (a == "thumb1-last") {$("#img-place img").attr({src: "pictures/ceramik_img12.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/ceramik_txt12.png')"}); }
				
				if (a == "thumb2-1") {$("#img-place img").attr({src: "pictures/clock_img1.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/clock_txt1.png')"}); }
				if (a == "thumb2-2") {$("#img-place img").attr({src: "pictures/clock_img2.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/clock_txt2.png')"}); }
				if (a == "thumb2-last") {$("#img-place img").attr({src: "pictures/clock_img3.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/clock_txt3.png')"}); }
				
				if (a == "thumb3-1") {$("#img-place img").attr({src: "pictures/stone_img1.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt1.png')"}); }
				if (a == "thumb3-2") {$("#img-place img").attr({src: "pictures/stone_img2.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt2.png')"}); }
				if (a == "thumb3-3") {$("#img-place img").attr({src: "pictures/stone_img3.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt3.png')"}); }
				if (a == "thumb3-4") {$("#img-place img").attr({src: "pictures/stone_img4.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt4.png')"}); }
				if (a == "thumb3-5") {$("#img-place img").attr({src: "pictures/stone_img5.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt5.png')"}); }
				if (a == "thumb3-6") {$("#img-place img").attr({src: "pictures/stone_img6.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt6.png')"}); }
				if (a == "thumb3-last") {$("#img-place img").attr({src: "pictures/stone_img7.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/stone_txt6.png')"}); }
				
				if (a == "thumb4-1") {$("#img-place img").attr({src: "pictures/leather_img1.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt1.png')"}); }
				if (a == "thumb4-2") {$("#img-place img").attr({src: "pictures/leather_img2.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt2.png')"}); }
				if (a == "thumb4-3") {$("#img-place img").attr({src: "pictures/leather_img3.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt3.png')"}); }
				if (a == "thumb4-4") {$("#img-place img").attr({src: "pictures/leather_img4.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt4.png')"}); }
				if (a == "thumb4-5") {$("#img-place img").attr({src: "pictures/leather_img5.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt5.png')"}); }
				if (a == "thumb4-6") {$("#img-place img").attr({src: "pictures/leather_img6.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt6.png')"}); }
				if (a == "thumb4-7") {$("#img-place img").attr({src: "pictures/leather_img7.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt7.png')"}); }
				if (a == "thumb4-8") {$("#img-place img").attr({src: "pictures/leather_img11.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt11.png')"}); }
				if (a == "thumb4-9") {$("#img-place img").attr({src: "pictures/leather_img12.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt12.png')"}); }
				if (a == "thumb4-10") {$("#img-place img").attr({src: "pictures/leather_img13.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt13.png')"}); }
				if (a == "thumb4-11") {$("#img-place img").attr({src: "pictures/leather_img14.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt14.png')"}); }
				if (a == "thumb4-12") {$("#img-place img").attr({src: "pictures/leather_img15.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt15.png')"}); }
				if (a == "thumb4-13") {$("#img-place img").attr({src: "pictures/leather_img16.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt16.png')"}); }
				if (a == "thumb4-last") {$("#img-place img").attr({src: "pictures/leather_img8.jpg"}); $("#describtion").css({backgroundImage: "url('pictures/leather_txt8.png')"}); }
			return false;
		});
		
			$("#type-top").click(function(){
				var n = $("#month-image img").attr('name');
				var new_month = parseInt(n) + 1;
					if (new_month > 13) new_month = 1;
					var src =  "pictures/" + month[new_month];
					
				$("#month-image img").attr({name: new_month, src: src});
			});
			
			$("#type-bottom").click(function(){
				var n = $("#month-image img").attr('name');
				var new_month = parseInt(n) - 1;
					if (new_month < 1) new_month = 13;
					var src =  "pictures/" + month[new_month];
					
				$("#month-image img").attr({name: new_month, src: src});
			});
			
			$("#decorarion1").click(function(){
				window.open("creative.html", "_self");
			});
			
		/*$(".month").click(function(){
		 	var a = $(this).attr('id');
		 		if (a == "month1") filename = "pictures/dragon/01.jpg";
		 		if (a == "month2") filename = "pictures/dragon/02.jpg";
		 		if (a == "month3") filename = "pictures/dragon/03.jpg";
		 		if (a == "month4") filename = "pictures/dragon/04.jpg";
		 		if (a == "month5") filename = "pictures/dragon/05.jpg";
		 		if (a == "month6") filename = "pictures/dragon/06.jpg";
		 		if (a == "month7") filename = "pictures/dragon/07.jpg";
		 		if (a == "month8") filename = "pictures/dragon/08.jpg";
		 		if (a == "month9") filename = "pictures/dragon/09.jpg";
		 		if (a == "month10") filename = "pictures/dragon/10.jpg";
		 		if (a == "month11") filename = "pictures/dragon/11.jpg";
		 		if (a == "month12") filename = "pictures/dragon/12.jpg";
		 	
		 	var modal_width = width_height()['width'];
		 	var modal_height = width_height()['height'];
		 		if (modal_height < 768) modal_height = 768;
		 	var popup_left = width_height()['width'] / 2 - 400;	
		 	//alert (filename);
		 	
		 	$("#modal").css({height: modal_height, width: modal_width});
		 	$("#popup-place").css({left: popup_left});
		 	$("#popup-place img").attr({src: filename});
		 	$("#modal, #popup-place").css({display: 'block'});	
		 	return false;
		});
		
		$("#modal, #popup-place").click(function(){
			$("#modal, #popup-place").css({display: 'none'});
			$("#popup-place img").attr({src: "pictures/dragon/spacer.png"});
			return false;
		});*/
	});
			
			


