﻿	// IC Hotels - View, October 2010 //
	// Omega Graphic - Antalya / omegagraphic.com //
	// Author: Ozgur Gurckaya / gurckaya.com // 	

	//--------------- Jquery block --------------------------

	$.fn.view = function(variables, init){
	
	variables = $.extend({}, {
		
			actionLock: false,
			slideMenuFlag: false,
			mainMenuFlag: false,
			selectedSlideMenu: '',
			selectedMainMenu: '',
			onlineFlag: false,
			languageFlag:false,
			pageType: '',
			padding: 0,
			paddingWidth: 40,
			paddingHeight: 192,
			sliderSport: 0,
			sliderVillas: 0,
			sliderMeetings: 0,
			contentPosition: '',
			gallery_: '',
			hotel_id: '',
			menuID: ''
			
						
		}, variables);	
		
	init = $.extend({}, {
		
			processURL: '',
			processParameters: '',
			backResponse: function(){},
			ajaxResponse: ''
						
		}, init);			

		$(document).ready(function(){
		
			setVariables();
			reSetObjectPlaces();
			
			if (variables.pageType == 'main') {
				
				$('#wallpaper').og_slider({speed: 1500,duration: 3000,object: '#wallpaper'},{gallery:2});
				
			} else {
				
				$('#wallpaper').og_slider({speed: 1500,duration: 3000,object: '#wallpaper'},{gallery:variables.gallery_, menuID:variables.menuID});
				$('#og-gallery').og_gallery({object: '#og-gallery'},{},{});
				
			};
			
			$('#GT').datepicker({dateFormat: 'yy.mm.dd'});
			$('#CT').datepicker({dateFormat: 'yy.mm.dd'});
			
			$('#flv-button').css({top:'20px',left:$(window).width() - 570 + 'px'});																
			
			$('#hotel-menu li:not(.spacer)').mouseover(function() {
				
				$(this).css({border:'1px solid #000',padding:'5px',background:'#dbdbe0'});
								
			}).mouseleave(function() {
				
				$(this).css({height:'20px','line-height':'20px',margin:'0px',padding:'5px',background:'#000'});
				
			});

			moveContent = function(type, direction) {
				
				delayx = type == 'first' ? (2500) : (0);
				point = direction == 'in' ? (($(window).width() - 40) / 2 + 'px')  : (($(window).width() - 80) + 'px');
				
				variables.contentPosition = direction;
				
				$('#general-content').stop().delay(delayx).animate({left:point}, 500, "easeout");
				
			}
			
			moveContent('first','out');
			
			$('#structure-content').mousemove(function(e){
				
				if (e.pageX > ($(window).width() - 100) / 2) {
					
					moveContent('second','in');
					
				} else {
					
					moveContent('second','out');
					
				}
				
			});
			
			/*$('.showreel').click(function() {
				
				var id = $(this).attr('object');
				
				$('#overlay').show().animate({opacity:0.5},200,"linear",function() {
										
					$('#video-scene').attr('src','videos.asp?id=' + id + '');

					$('#videos').topZIndex().show();
					
				});
			});*/
			
			$('#videos b').click(function() {
				
				$('#videos').animate({opacity:0},200,"linear",function() {
					
					$('#overlay').animate({opacity:0},200,"linear",function() {
					
						$('#overlay').hide();	
						$('#videos').hide();							
						
					});
					
				});				
				
			});						
			
			$('#structure-content-corporate').mouseover(function(){
				
				$('.corporate').stop().animate({opacity:1}, 250, "linear");
				
			}).mouseleave(function() {

				$('.corporate').stop().animate({opacity:0}, 250, "linear");

			});
			
			$('#hotel-menu li').mouseover(function() {
				
				var index = $(this).attr('index');
			
				$('.sub-menu-object[id=sub-menu-' + index + ']').stop().animate({top:'0px'}, 300, "easeout");
				$('.sub-menu-object[id!=sub-menu-' + index + ']').stop().animate({top:'-35px'}, 300, "easeout");
				
			});
			
			$('.content-slider li').mouseover(function() {
				
				$(this).find('.slide-description').stop().animate({opacity:1}, 200, "linear");
				
			}).mouseleave(function() {
				
				$(this).find('.slide-description').stop().animate({opacity:0}, 200, "linear");
				
			});
			
			$('.down-arrow,.up-arrow').mouseover(function() {
				
				$(this).stop().animate({opacity:0.7}, 200, "linear");
				
			}).mouseleave(function() {
				
				$(this).stop().animate({opacity:0.5}, 200, "linear");
				
			});			
			
			
			
			$('.down-arrow.sports').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderSport;

					$('.content-slider.sports li[index=' + variables.sliderSport + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.sports li[index=' + variables.sliderSport + ']').hide();
						variables.sliderSport = currentSlide !== 2 ? (eval(currentSlide) + 1) : (0);
						$('.content-slider.sports li[index=' + variables.sliderSport + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});
			
			$('.up-arrow.sports').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderSport;

					$('.content-slider.sports li[index=' + variables.sliderSport + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.sports li[index=' + variables.sliderSport + ']').hide();
						variables.sliderSport = currentSlide !== 0 ? (eval(currentSlide) - 1) : (2);
						$('.content-slider.sports li[index=' + variables.sliderSport + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});	
			
			$('.down-arrow.villas').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderVillas;

					$('.content-slider.villas li[index=' + variables.sliderVillas + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.villas li[index=' + variables.sliderVillas + ']').hide();
						variables.sliderVillas = currentSlide !== 5 ? (eval(currentSlide) + 1) : (0);
						$('.content-slider.villas li[index=' + variables.sliderVillas + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});
			
			$('.up-arrow.villas').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderVillas;

					$('.content-slider.villas li[index=' + variables.sliderVillas + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.villas li[index=' + variables.sliderVillas + ']').hide();
						variables.sliderVillas = currentSlide !== 0 ? (eval(currentSlide) - 1) : (5);
						$('.content-slider.villas li[index=' + variables.sliderVillas + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});	
			
			$('.down-arrow.meetings').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderMeetings;

					$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').hide();
						variables.sliderMeetings = currentSlide !== 1 ? (eval(currentSlide) + 1) : (0);
						$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});
			
			$('.up-arrow.meetings').click(function() {
				
				if (!variables.actionLock) {
				
					variables.actionLock = true;
					
					var currentSlide = variables.sliderMeetings;

					$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').stop().animate({opacity:0}, 200, "linear", function() {
					
						$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').hide();
						variables.sliderMeetings = currentSlide !== 0 ? (eval(currentSlide) - 1) : (1);
						$('.content-slider.meetings li[index=' + variables.sliderMeetings + ']').show().stop().animate({opacity:1}, 500, "linear");
						variables.actionLock = false;
						
					});

				}
				
			});									
			
			$('.slide-menu-object').mouseover(function() {
				
				if (variables.selectedSlideMenu !== $(this).attr('index')){
					$(this).find('.slide-menu-background').stop().animate({opacity:1}, 200, "linear");
				}
				
			}).mouseleave(function() {
				
				if (variables.selectedSlideMenu !== $(this).attr('index')){
					$(this).find('.slide-menu-background').stop().animate({opacity:0.7}, 200, "linear");
				}
				
			});
			
			$('.main-menu[id!=mainmenu-0]').mouseover(function() {
				
				if (variables.selectedSlideMenu !== $(this).attr('index')){
					$(this).find('.main-menu-bg').stop().animate({opacity:0.7}, 200, "linear");
				}
				
			}).mouseleave(function() {
				
				if (variables.selectedSlideMenu !== $(this).attr('index')){
					$(this).find('.main-menu-bg').stop().animate({opacity:0.5}, 200, "linear");
				}
				
			});	
			
			
			$('.hotel').mouseover(function() {
				
				$(this).find('.hotel-bg').stop().animate({opacity:1}, 500, "linear");
				
				
			}).mouseleave(function() {
				
				$(this).find('.hotel-bg').stop().animate({opacity:0}, 500, "linear");
				
			});	
						
			$('.main-menu[id!=mainmenu-0]').click(function() {
				
				if (!variables.actionLock) {
					
					variables.actionLock = true;
					
					if (variables.mainMenuFlag) {
						
						var tmpX = variables.selectedMainMenu;
						
						$('#mainmenu-' + variables.selectedMainMenu).find('div.object-content').animate({top:'-195px'}, 500, "easeout",function(){ 
						
							$('#mainmenu-' + tmpX).find('.main-menu-object').hide() 
							
						});
						
					} else {
						
						variables.mainMenuFlag = true;
						
					}
					
					if (variables.selectedMainMenu !== $(this).attr('index')){	
																
						variables.selectedMainMenu = $(this).attr('index');
						
						$(this).find('.main-menu-object').show()
						$(this).find('div.object-content').show().animate({top:'0px'}, 500, "easeout", function(){ variables.actionLock = false });						
						
					} else {
						
						variables.mainMenuFlag = false;
						variables.selectedMainMenu = '';
						variables.actionLock = false;
						
					}
										
				}
								
			});

			$('.slide-menu-object').click(function() {
				
				if (!variables.actionLock) {
					
					variables.actionLock = true;
					
					if (variables.slideMenuFlag) {
						
						$('#slide-menu-' + variables.selectedSlideMenu).animate({top:$('.slide-menu').height() - 67 + 'px'}, 500, "backout").find('div.slide-menu-background').animate({opacity:0.7}, 200, "linear");
						
					} else {
						
						variables.slideMenuFlag = true;
						
					}
				
					if (variables.selectedSlideMenu !== $(this).attr('index')){
						
						variables.selectedSlideMenu = $(this).attr('index');
						
						$(this).animate({top:'30px'}, 500, "backout", function(){ variables.actionLock = false });
						
					} else {
						
						variables.slideMenuFlag = false;
						variables.selectedSlideMenu = '';
						variables.actionLock = false;
						
					}
					
				}
				
			});
	
		});//end ready
		
		$(window).resize(function() {

			reSetObjectPlaces();
		
		});	
		
		newsletterValidation = function(str) {
	
			var at = "@";
			var dot = ".";
			var lat = str.indexOf(at);
			var lstr = str.length;
			var ldot = str.indexOf(dot);
		
			
			if (str.indexOf(at)==-1){
				
			   get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");			  
			   return false;
			   
			}
	
			if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
				
			   get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
			   return false;
			   
			}
	
			if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
				
				get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
				return false;
				
			}
	
			 if (str.indexOf(at,(lat+1))!=-1){
				 
				get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
				return false;
				
			 }
	
			 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
				 
				get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
				return false;
				
			 }
	
			 if (str.indexOf(dot,(lat+2))==-1){
				 
				get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
				return false;
				
			 }
			
			 if (str.indexOf(" ")!=-1){
				 
				get.warn("Geçersiz bir e-posta adresi girdiniz. Lütfen kontrol edin", 64, "ogOkOnly");
				return false;
				
			 }
	
			 return true;					
		}
	
		
	
			
		reSetObjectPlaces = function() {		
			
			if($(window).width() > 1100) {
				$('#structure-header-right').css({position:'absolute',left:$(window).width() - $('#structure-header-right').width() + 'px'});			
			}
			
			if ($(window).width() < 1080) {
				
				if ($('#weinvite').attr('src') !== 'images/we-invite-you-to-comfort2.png') {
				
					$('#weinvite').attr('src','images/we-invite-you-to-comfort2.png');
					
				};
				
			} else {
				
				if ($('#weinvite').attr('src') !== 'images/we-invite-you-to-comfort.png') {
				
					$('#weinvite').attr('src','images/we-invite-you-to-comfort.png');
					
				};
				
			};	
			
			$('#flv-button').css({top:'20px',left:$(window).width() - 570 + 'px'});			
			
			$('.showreel').css({top:$(window).height() - $('.showreel').height() - 84 + 'px',left:$(window).width() - $('.showreel').width() - 20 + 'px'});
			
			$('#overlay').css({width:$(window).width(), height:$(window).height()});
			$('#videos').css({left:$(window).width() / 2 - $('#videos').width() / 2 + 'px',top:$(window).height() / 2 - $('#videos').height() / 2 + 'px'});
			
			$('#advertise').css({left:$(window).width() / 2 - $('#advertise').width() / 2 + 'px',top:$(window).height() / 2 - $('#advertise').height() / 2 + 'px'});
			
			$('#gallery-content').css({position:'absolute', top:($(window).height() - 108 - 84) - 110 - 35 + 'px'});
			
			$('#spec-gallery').css({top:($(window).height() - 108 - 84) / 2 - $('#spec-gallery').height() / 2, left:($(window).width() - 40) / 2 - $('#spec-gallery').width() / 2});
 - 
			$('#structure-content,#og-gallery').css({width:$(window).width() - 40 + 'px', height:$(window).height() - 108 - 84 + 'px'});
			$('#structure-content-corporate').css({width:$(window).width() - 40 + 'px', height:$(window).height() - 108 - 84 + 'px'});	
			$('#corporate-bg').css({width:$(window).width() - 40 + 'px', height:$(window).height() - 108 - 84 + 'px',opacity:0.7});	
			$('#corporate-menu').css({height:$(window).height() - 108 - 105 + 'px'});				
			$('#corporate-content').css({width:$(window).width() - 350 + 'px', height:$(window).height() - 157 - 84 + 'px',left:'260px'});

			$('#structure-left-border').css({left:'0px',height:$(window).height() - 108 - 84 + 'px'});
			$('#structure-right-border').css({left:$(window).width() - $('#structure-right-border').width() + 'px',height:$(window).height() - 108 - 84 + 'px'});
			
			$('#structure-footer').css({top:$(window).height() - 84 + 'px'});
			
			$('#hotel-online-booking').css({top:'25px',left:$(window).width() - 326 + 'px'});
			$('#hotel-online-booking2').css({top:'25px',left:$(window).width() - 483 + 'px'});
			
			$('#sub-menu-container').css({width:$(window).width() - 40 + 'px', top:'108px',left:'20px'});
			
			$('#loader').css({left:($(window).width() - 40) / 2 - 37 + 'px',top:($(window).height() - 184) / 2 - 37 + 'px'});
			
			$('#general-content').css({top:(($(window).height() - 184) / 2) - 150 + 'px',left:($(window).width() - 40) / 2 + 'px',width:($(window).width() - 40) / 2 + 'px'});
			$('#general-content-content').css({width:(($(window).width() - 40) / 2) - 40 + 'px',left:'20px'});
			$('#scroll').css({left:$('#general-content-content').width() + 27 + 'px'});
			$('.dragger_container').css({left:$('#general-content-content').width() + 'px'});
			$('.slide-menu').css({width:$('#structure-content').width() + 1 + 'px',top:$('#structure-content').height() - 270 + 'px'});					
			
			$('#footer-awards').css({left:$('#structure-footer').width() - $('#footer-awards').width() - 20 + 'px', top:'12px'});
			
			$('#hotel-menu').css({position:'absolute',top:'68px',left:$(window).width() - 20 - $('#hotel-menu').width() + 'px'});
			
			$('#wallpaper').css({top:(($(window).height() - variables.paddingHeight) / 2) - ($('#wallpaper').height() / 2) + 'px',left:(($(window).width() - variables.paddingWidth) / 2) - ($('#wallpaper').width() / 2) + 'px'});
			
			$('#wp-overlay').css({top:(($(window).height() - variables.paddingHeight) / 2) - ($('#wallpaper').height() / 2) + 'px',left:(($(window).width() - variables.paddingWidth) / 2) - ($('#wallpaper').width() / 2) + 'px'});
			
			$('.slide-menu-object').each(function() {
				
				var index = $(this).attr('index');

				var top_ = variables.selectedSlideMenu !== index ? ($('.slide-menu').height() - 67) : ('30px')
				var width_ = Math.round(($('.slide-menu').width() - 3) / 4);
				var left_ = index == '0' ? (0) : ((index * width_) + eval(index));

				$(this).css({width:width_ + 'px', left:left_ + 'px',top:top_ + 'px'});
				
				$(this).find('div.slide-menu-background,div.slide-menu-title').css({width:width_ + 'px'});
				if (variables.selectedSlideMenu !== $(this).attr('index')){
					$(this).find('div.slide-menu-background').css({opacity:0.7});
				}
				$(this).find('div.slide-menu-content').css({width:width_ + 'px'});
				
				$(this).find('div.content-slider').css({left:(width_ / 2) - 132 + 'px',top:'0px'});
				
				
			});
			
			$('.up-arrow').css({opacity:0.5, left:($('.slide-menu-object').width() / 2) - ($('.up-arrow').width() / 2) - 15 + 'px'});
			$('.down-arrow').css({opacity:0.5, left:($('.slide-menu-object').width() / 2) + ($('.down-arrow').width() / 2) - 10 + 'px'});			
			
			var i = 0;
			$('.main-menu').each(function() {
				
				var width_ =  $(this).attr('id') == 'mainmenu-0' ? ($(window).width() - 703) : (220);
				var left_ = $(this).attr('id') == 'mainmenu-0' ? (0) : (($(window).width() - 924) + (221 * i) + 1);
		
				$(this).css({left:left_ + 'px', width:width_ + 'px'});
				
				i++;
				
			});		
			
		}
		
		setVariables = function() {

			$('#overlay').css({opacity:0}).hide().css({width:$(window).width(), height:$(window).height()});
			$("#prompt").draggable();
			$('#loader').css({opacity:0});
			
			$('*[visual=opacity]').css({opacity:0.5});
			$('#videos').hide();
			
			if ($(window).width() < 1080) {
				
				if ($('#weinvite').attr('src') !== 'images/we-invite-you-to-comfort2.png') {
				
					$('#weinvite').attr('src','images/we-invite-you-to-comfort2.png');
					
				};
				
			} else {
				
				if ($('#weinvite').attr('src') !== 'images/we-invite-you-to-comfort.png') {
				
					$('#weinvite').attr('src','images/we-invite-you-to-comfort.png');
					
				};
				
			};
			
			/*-----scroll og_scroll (gurckaya.com)--------*/
			if ($('#scroll-content').height() > 1000) {
				var h = $('#scroll-content').height() * 0.65;//css('height');
			} else {
				var h = $('#scroll-content').height();//css('height');				
			};						

			var contentHeight = eval(h);
			var h_equal = contentHeight > 200 ? (contentHeight / 200) : (0);
			var w = (200 / h_equal);
			if (contentHeight > 200) {
				$('#scroll-button').css({height:'0px'}).animate({height:w+'px'},500,"easeout") ;			
				$('#scroll-button').draggable({axis: 'y',containment: 'parent', drag:function() {
					var t_ = $(this).css('top');
					t_ = t_.replace('px','');
					//x_ = 200 - t_;
					$('#scroll-content').stop().animate({top: -1 * t_ * h_equal + 'px'}, 999, "backout");				
				}});	
			} else {
				$('#scroll-button').css({height:'0px'}).animate({height:'200px'},500,"easeout") ;	
			};
			/*-----scroll--------*/
			
			$('#sub-menu-container').css({width:$(window).width() - 40 + 'px', top:'108px',left:'20px'});
			
			$('.sub-menu-object').css({top:'-35px'});
			
			$('.sub-menu-bg').css({opacity:0.5});
			
			$('#general-content').css({top:(($(window).height() - 184) / 2) - 150 + 'px',left:($(window).width() - 40) / 2 + 'px',width:($(window).width() - 40) / 2 + 'px'});
			$('#general-content-content').css({width:(($(window).width() - 40) / 2) - 40 + 'px',left:'20px'});
			$('#general-content-bg').css({opacity:0.8});
			$('#scroll').css({left:$('#general-content-content').width() + 27 + 'px'});
			$('.dragger_container').css({left:$('#general-content-content').width() + 'px'});
			$('#hotel-menu').css({position:'absolute',top:'68px',left:$(window).width() - 20 - $('#hotel-menu').width() + 'px'});
			
			$('.main-menu-object-bg,.slide-description-bg').css({opacity:0.7});
			$('.main-menu-bg').css({opacity:0.5});
			$('.main-menu-object').hide();
			$('.hotel-bg,.slide-description').css({opacity:0});
			$('.slide-menu-content').css({cursor:'default'});
			
			$('#hotel-online-booking').css({top:'25px',left:$(window).width() - 326 + 'px'});	
			
			$('.slide-menu-object').each(function() {
				
				var index = $(this).attr('index');
				var width_ = Math.round(($('.slide-menu').width() - 3) / 4);
				var left_ = index == '0' ? (0) : ((index * width_) + eval(index));

				$(this).css({width:width_ + 'px', left:left_ + 'px',top:$('.slide-menu').height() - 67 + 'px'});
				
				$(this).find('div.slide-menu-background,div.slide-menu-title').css({width:width_ + 'px',top:'0px'});
				$(this).find('div.slide-menu-background').css({opacity:0.7});
				$(this).find('div.slide-menu-content').css({width:width_ + 'px'});
				
			});	
			
			$('.content-slider li[index!=0]').each(function() {
				
				$(this).hide().css({opacity:0});
				
			});
			
			$('.main-menu-object').css({top:'82px'});
			$('.object-content').css({top:'-195px'});
			
		}
		
		closeBox = function() {
			
			$('#overlay').animate({opacity:0}, 250, "easeout", function() {
				$('#prompt').hide().html('');
				$('#overlay').hide();
			});	
				
		}
		
		var ajax = {
			
			get: function() {
				
				
				var sb = init.processURL.replace('%40','@');
				
				$.post(sb, function(data) {	
			
					init.ajaxResponse = data;
					init.backResponse();
						
				});
				
				return;
				
			}
			
		}
		
		var get = {
				
			warn: function(text, icon, button) {
			
				$('#prompt').append('<div class="icon"><img src="images/prompt-icons/' + icon + '.png" /></div>')
				$('#prompt').append('<div class="p_text">' + text + '</div>')
				$('#prompt').append('<div class="buttons"><input type="button" onClick="closeBox();" value="Ok"/></div>')				
								
				$('#overlay').show().animate({opacity:0.4}, 250, "easeout", function() {
					
					$('#prompt').show();
				
				});
				
			}
			
		}

	}
	//--------------------------------------------------------------
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
