$(function() {
	$(".menuLeft").accordion({
		active: false,
		autoheight: false,
		header: '.head',
		navigation: true,
		alwaysOpen: false
	});
	var autoplay = "true";
	$(".music").jmp3({ backcolor: "ff9900", forecolor: "E767A6", width: 120, height: 20, autoplay: autoplay, showdownload: "false", repeat: "false" });
	$('.slides').cycle({ speed: 'slow', timeout: 3000, pause: 1});
	$(".tabs").idTabs();
	$("#baslik").html($(".current").text());
	
	$("a.video").media({autoplay:1});	
	$("#ziyaretciDefteri").validate({
		rules: {
			adsoyad: {
				required: true,
				minlength: 5
			},
			eposta: {
				required: true,
				email: true
			},
			mesaj: {
				required: true,
				minlength: 5
			}
		},
		messages: {
			adsoyad: {
				required: 'Lütfen adınızı yazınız.',
				minlength: 'En az beş harf lütfen!'
			},
			eposta: {
				required: 'Lütfen eposta adresinizi yazınız.',
				email: 'Lütfen geçerli bir eposta adresi yazınız.'
			},
			mesaj: {
				required: 'Lütfen mesajınızı yazınız.',
				minlength: 'En az beş harf lütfen!'
			}				
		}
	});
});
$.fn.clearForm = function() {
  return this.each(function() {
 var type = this.type, tag = this.tagName.toLowerCase();
 if (tag == 'form')
   return $(':input',this).clearForm();
 if (type == 'text' || type == 'password' || type == 'hidden' || tag == 'textarea')
   $(this).attr({'defaultValue':'', 'value':'' });
 else if (type == 'checkbox' || type == 'radio')
   this.checked = false;
 else if (tag == 'select')
   this.selectedIndex = -1;
  });
};
