$(document).ready(function(){

		 
		/* LINKS OUTLINE NONE IE */
		$("a").focus(function() {
  			$(this).blur();
		});
		
		$('a[rel=external]').click(function(){
			window.open(this.href); 
			return false;
  		});

		
		$("a[href=#]").attr("href", "javascript:void(0);");

		
		/* FOR THE PLAYLIST */
		$("#playlist_list li a").click(function(){
         	$(".playlistclicked").removeClass("playlistclicked");
         	$(this).addClass("playlistclicked");
      	}); 
		
		
		/* bio tabs */
		$('#biolang').minitabs();

		
		
   		$("#pastdates").hide();
		$("#more").click(function(){
         	$("#pastdates").slideToggle("fast");
         	$(this).toggleClass("open");
      	});
      	
      
		
		
		
		
			/*------------- concerts----------*/
	if ($('ul#newsinner li').length === 0) {
		$('ul#newsinner').append('<div class="none">See you in 2011<br />Rendez-vous en 2011<br />2011 yılında görüşürüz</div>');
		//alert('empty.');
	}else{
		//alert('not empty.');
	}
		
		
		var newSRC1 = $("#flickrscrollr a:first").attr("href");
		var newTITLE1 = $("#flickrscrollr a:first").attr("rev");
  		$(".colleft img").attr("src", newSRC1);
  		$(".colleft h4.bold").text( newTITLE1);
  			
		$("#flickrscrollr a").click(function(event){
  			event.preventDefault();
  			var newSRC = $(this).attr("href");
  			var newTITLE = $(this).attr("rev");
  			$(".colleft h4.bold").empty();
  			$(".colleft img").attr("src", newSRC);
  			$(".colleft h4.bold").text( newTITLE);
  			Cufon.refresh();
		});

		
      	/*------------------------	VIDEOS  */
		var thetitled = $("#bodyvideos #middle .videos li:first a").attr("title");
		$("#bodyvideos .colleft h4").append(thetitled);
		
		
		$("#bodyvideos #middle .videos li a").click(function(){
			$("#bodyvideos .colleft h4").empty();
			var thetitle2 = $(this).attr("title");
			$("#bodyvideos .colleft h4").append(thetitle2);
			Cufon.refresh();
		});

		/************** audio ***************/
		 var mysong1 = $('#song1');
		 var mysong2 = $('#song2');
		 var mysong3 = $('#song3');
		 var mydownload = $('#download');
		 
		 mysong1.addClass("chosen");
		 mydownload.attr('href', 'mp3/a_bit_odd.mp3.zip');
		
		 mysong1.click(function(e)
		 {
			mydownload.attr('href', 'mp3/a_bit_odd.mp3.zip');
			 $(".linkblock a").removeClass("chosen");
			$(this).addClass("chosen");
		 });
		 mysong2.click(function(e)
		 {
			 mydownload.attr('href', 'mp3/roman_olson _ limoncu.mp3.zip');
			 $(".linkblock a").removeClass("chosen");
			$(this).addClass("chosen");
		 });
		 mysong3.click(function(e)
		 {
			 mydownload.attr('href', 'mp3/tekirdag_karsilamasi.mp3.zip');
			 $(".linkblock a").removeClass("chosen");
			$(this).addClass("chosen");
		 });
		
		/*------------------------ TALLEST EQUAL HEIGHT  */
		/*var bottomrighth = $("#bottom .colright").height();
		var bottomlefth = $("#bottom .colleft").height();
		if(bottomrighth > bottomlefth){
			$(".colleft").css({height:+bottomrighth+"px"});
			//alert(" left: " +bottomlefth+" right: "+bottomrighth) ;
		}else{
			$(".colright").css({height:+bottomlefth+"px"});
			//alert(" left: " +bottomlefth+" right: "+bottomrighth) ;
		}
		*/
		
		
		/*------------------------	LEFT PANE  */
		
		var pane = $('#newsinner,#fs_wrapper,#videos2');
		pane.jScrollPane(
			{
				showArrows: false,
				animateScroll: true
			}
		).bind(
			'jsp-arrow-change',
			function(event, isAtTop, isAtBottom, isAtLeft, isAtRight)
			{	
				$('#plus')[isAtBottom ? 'hide' : 'show']();
				$('#minus')[isAtTop ? 'hide' : 'show']();
			}
		);
		var api1 = pane.data('jsp');
		
		
		
		$('#plus').bind('click',function(){
			api1.scrollByY(parseInt($(this).attr('rel')));
			return false;
		 });
		 
		$('#minus').bind('click',function(){
			api1.scrollByY(parseInt($(this).attr('rel')));
			return false;
		});
		
		
		/*------------------------	ON WINDOW LOAD  */
		
		$('#minus').hide();
		var hash = window.location.hash;
		//if(!hash) {$('#minus').hide();}
		
		
		if(!pane.hasClass('jspScrollable')){
			$('.updown_nav').hide();
		}
		
		
		

});// The end of our jQuery function	

Cufon.replace('.light', {
fontFamily: 'Diavlo Light', 
hover: true
});

Cufon.replace('.book', {
fontFamily: 'Diavlo Book', 
hover: true
});

Cufon.replace('.medium', {
fontFamily: 'Diavlo Medium', 
hover: true
});

Cufon.replace('.bold', {
fontFamily: 'Diavlo Bold', 
hover: true
});

/*Cufon.replace('.colleft h4', {
fontFamily: 'Diavlo Bold', 
hover: true
});*/

Cufon.replace('.black', {
fontFamily: 'Diavlo Black', 
hover: true
});

// <![CDATA[

// allowScriptAccess must be set to allow the Javascript from one 
// domain to access the swf on the youtube domain
var params = { allowScriptAccess: "always", bgcolor: "#000000" };
// this sets the id of the object or embed tag to 'myytplayer'.
// You then use this id to access the swf and make calls to the player's API
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/Tv7yFadlDYU&amp;autoplay=1&amp;enablejsapi=1&amp;playerapiid=ytplayer",
				 "vid", "320", "259", "8", null, null, params, atts);

swfobject.embedSWF("http://www.youtube.com/v/Tv7yFadlDYU&amp;autoplay=0&amp;enablejsapi=1&amp;playerapiid=ytplayer",
				 "vid2", "320", "259", "8", null, null, params, atts);

//]]>

