﻿var currentM = "10"; 
var currentV = "10"; 
$(document).ready(function(){
$('div.menuLinkNormal2').click(function () {
$('div.the_menu').slideToggle('medium');
    });																											
var i;
for(i=0; i<10; i++) videoHover(i);
videoDegis(0);
TarihBul();
$('img.redOk').attr({ src: "images/mesajlar.png" });
$('img.ayirac').attr({ src: "images/ayirac.jpg" });
$('img.kulaklik').attr({ src: "images/kulaklik.png" });
$('img.folder').attr({ src: "images/folder.png" });
$('img.yorum').attr({ src: "images/group.png" });

$('img.noimage').error(function() {
		$(this).attr({
			src: 'images/noa.png',
			alt: 'Profil resmi yok!',
			style:'width:66px;height:66px;'
		});
	});

$('img.noimage2').error(function() {
		$(this).attr({
			src: 'images/noa.png',
			alt: 'Profil resmi yok!',
			style:'width:80px;height:80px;border:solid 1px silver;padding:3px;'
		});
	});

$('div.lightBlueLine').html("<!-- -->");
$('#surReklam').hover( function() { reklamGoster(); } , function() {reklamGizle();});

});

function havadurumu(){
var sehir= $("select").serialize();
$('#durum').html('<img src="http://www.zekirdek.com/xzekirdek/images/loader.gif"/>')
$.ajax({
	type:'POST',
	url:'hava/isle.php',
	data:sehir,
	success:function durum(msg){
			$('#weather').html(msg);
							   }
});
}

function showHide(shID) {
	if (document.getElementById(shID)) {
		if (document.getElementById(shID+'-show').style.display != 'none') {
			document.getElementById(shID+'-show').style.display = 'none';
			document.getElementById(shID).style.display = 'block';
		}
		else {
			document.getElementById(shID+'-show').style.display = 'inline';
			document.getElementById(shID).style.display = 'none';
		}
	}
}


function TarihBul()
{
    var tarih = new Date();
    $("#tarihTop").html(tarih.toLocaleDateString());
}

function YorumPencere(adres, Boyut_X, Boyut_Y) {
	window.open(adres,"quoted","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=" + Boyut_X + ",height=" + Boyut_Y + ",top=0,left=0");
}


function videoHover(id)
{ 
    $('#vT' + id).hover( function() { videoDegis(id); } , function() {  });
    $('#vT' + id).addClass("videoThumbs");
    $("#vTL" + id).attr({ href: $("div.vidLink:eq(" + id + ")").text() });
}

function videoDegis(id)
{ 
    if(id != currentV)
    {
         $("img.videoResim").attr({ src: $("div.vidPict:eq(" + id + ")").text() });
         $("#videoLink").attr({ href: $("div.vidLink:eq(" + id + ")").text() });
         $("div.videoTitle").html($("div.vidTitle:eq(" + id + ")").text());

         $('#vT' + currentV).removeClass("videoThumbs2");  $('#vT' + currentV).addClass("videoThumbs");
         $('#vT' + id).removeClass("videoThumbs"); $('#vT' + id).addClass("videoThumbs2");
         currentV = id;
    }
}
  
function addBookmark(title,url) 
{
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

function Yazdir(adres, Boyut_X, Boyut_Y){
	EWin = eval(window.open(adres,"quoted","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=" + Boyut_X + ",height=" + Boyut_Y + ",top=0,left=0"));
}

function reklamGoster(){  $('#surReklam').removeClass("sr1"); $('#surReklam').addClass("sr2");}
function reklamGizle() {   $('#surReklam').removeClass("sr2"); $("#surReklam").addClass("sr1"); }

$(document).ready(function() {
	$(".forumlar-kategori").hover( function(){
		$(this).animate({backgroundColor: "#efece4"}, 500 );
	},
	function(){
		$(this).animate({backgroundColor: "#f5f3ef"}, 500 );
	});
	$("label").click(function () {
		$("label").removeClass("ust-kisim-g-p-b-secilmis").removeClass("ust-kisim-g-p-b-aktif");
		$(this).addClass("ust-kisim-g-p-b-secilmis").css({opacity: 1});
	});
	$("label").mouseover(function(){
		$(this).not(".ust-kisim-g-p-b-secilmis").addClass("ust-kisim-g-p-b-aktif");
	});
	$("label").mouseout(function(){
		$(this).removeClass("ust-kisim-g-p-b-aktif");
	});
	$("label").click(function () {
		$("label").removeClass("ust-kisim-a-s-secilmis").removeClass("ust-kisim-a-s-aktif");
		$(this).addClass("ust-kisim-a-s-secilmis").css({opacity: 1});
	});
	$("label").mouseover(function(){
		$(this).not(".ust-kisim-a-s-secilmis").addClass("ust-kisim-a-s-aktif");
	});
	$("label").mouseout(function(){
		$(this).removeClass("ust-kisim-a-s-aktif");
	});
	$(".forum-alt-kisim-orta").hover( function(){
		$(this).animate({backgroundColor: "#efece4"}, 500 );
	},
	function(){
		$(this).animate({backgroundColor: "#f5f3ef"}, 500 );
	});
});

function ust_kisim_a_s(oBox) {
	var el, i = 0, f = oBox.form;
	while (el = f[i++]) if (el.type == 'checkbox') el.checked = (el == oBox && el.checked);
}