$(document).ready(function()
{
	$('.accordion>a').click(function(){
		if($(this).attr('class')!='acik')
		{
			$('.accordion').each(function(){ $(this).children(':last').slideUp('fast', function(){ $(this).parent().removeClass('on'); }); $(this).children(':first').removeClass('acik'); });	
			$(this).addClass('acik'); $(this).parent().addClass('on'); $(this).next().slideDown('fast');
		}else
		{
			$(this).next().slideUp(':fast', function(){ $(this).prev().removeClass('acik'); $(this).parent().removeClass('on'); });	
		}
	});
	
	$("ul#altMenu a").hover(
      function () {
		$("div.tooltip").append($(this).attr('title'));
		   
		    imgsrc = $(this).children("img").attr("src");
      }, 
      function () {
        $("div.tooltip").empty();
      }
    );
	
});

var pollsrc = "/pollinterface.aspx";
function popPoll(id) { var w = 300; var h = 350; var win = window.open(pollsrc + "?ids=" + id, "poll", "width=" + w + ",height=" + h + ",resizable=no,scrollbars=yes"); }

function showToggle(id){ if($('#'+id).css('display') == 'none') $('#'+id).css('display', 'block');  else $('#'+id).css('display', 'none'); }


var bookmarkurl=location.href;
var bookmarktitle="755 88 88 Kontor Hatti"

function favoriyeEkle(){
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function facebookEkle(){	
		var adres = "http://www.facebook.com/home.php?#!/pages/TLyuklecom-755-88-88/126768190694977"; 
		window.open(adres,null,"height=600,width=800,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes");
}

function twitterEkle(){	
		var adres = "http://twitter.com/TLyuklecom"; 
		window.open(adres,null,"height=600,width=800,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes");
}

function arkadasinaGonder(){
	var adresArkadas = "http://www.mobilnet.com.tr/apps/SendToFriend.aspx?href=" + bookmarkurl 
	window.open(adresArkadas,null,"height=390,width=370,status=yes,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=auto");
}
