﻿		$(function(){
		
					$("#box2").load("http://www.barisoztekin.com/blog .widget_rss ul" ,function(){});

			 		$('#open').click(function(){
		            	$('#header').slideDown(800);
		            	$('#twitter').fadeIn(800);
		            	$('#socialLinks').fadeIn(2000);	            	
		            	$('#close').show();
		            	$(this).hide();
		            	twitter();
		            });
		            $('#close').click(function(){
   		            	$('#twitter').fadeOut(500);
		            	$('#socialLinks').fadeOut(500);
		            	$('#header').slideUp(800);
		            	$('#open').show();		            	
		            	$(this).hide();
		            });
		            $('#m01').click(function(){
						$(this).removeClass('m01');
		            	$(this).addClass('m01Selected');

		            	$('#m02').removeClass('m02Selected');
		            	$('#m02').addClass('m02');
		            	
		            	$('#m03').removeClass('m03Selected');
		            	$('#m03').addClass('m03');
		            	

		            	$('#works').fadeIn();
		            	$('#about').hide();
		            	$('#contact').hide();
		            });
		            $('#m02').click(function(){
						$(this).removeClass('m02');
		            	$(this).addClass('m02Selected');

		            	$('#m01').removeClass('m01Selected');
		            	$('#m01').addClass('m01');
		            	
		            	$('#m03').removeClass('m03Selected');
		            	$('#m03').addClass('m03');
		            	
		            	$('#works').hide();
		            	$('#about').fadeIn();
		            	$('#contact').hide();		            	
		            });
		             $('#m03').click(function(){
						$(this).removeClass('m03');
		            	$(this).addClass('m03Selected');

		            	$('#m01').removeClass('m01Selected');
		            	$('#m01').addClass('m01');
		            	
		            	$('#m02').removeClass('m02Selected');
		            	$('#m02').addClass('m02');

		            	
		            	$('#works').hide();
		            	$('#about').hide();
		            	$('#contact').fadeIn();
		            });
					
					$('#closeForm').click(function(){
						
						$('#contactFormContainer').fadeOut(500);
					});
					$('#contactFormOpener').click(function(){
						
						$('#contactFormContainer').fadeIn(500);
					});

		 
		 function twitter()
			    {
					var blindThisLink=document.getElementById('twitter').getElementsByTagName('a');
					blindThisLink[blindThisLink.length-1].style.display='none';
					for(i=0;i<blindThisLink.length;i++)
					{
						blindThisLink[i].target='_blank';
					}
				}
		});


			function invalid() {
				if (document.iletisimFormu.senderName.value.length < 2) {
				document.iletisimFormu.senderName.focus();
				return false;
				}
				if (document.iletisimFormu.senderMail.value.length < 6) {
				document.iletisimFormu.senderMail.focus();
				return false;
				}
				if (document.iletisimFormu.senderMessage.value.length < 2) {
				document.iletisimFormu.senderMessage.focus();			
				return false;
				}
				return true;
				}

