﻿Cufon.replace( '.navigationHeader, .digerHaberlerHeader span, .eBultenForm .ebultenTitle, .sponsors li span, .copyright,  .thePost .thePostContent .thePostContentHalf .rightTitle a, .thePost .thePostContent .thePostContentHalf .readMoreLink a, .thePost .thePostHeader .hLeft, .allBlogs, .mainCarousel li a span', {fontFamily:"MetaPro-Normal"} );
Cufon.replace( '.languageSelector a, .topmenu li a, .footermenu li a, .macProgramiHeader, .macBilgi, .flickrHeader, .vimeoHeader, .twitterHeader, .sinanGulerSolbilgi .playerInfoBox div', {fontFamily:"MetaPro-Medium"} );
Cufon.replace( '.headerRight a', {fontFamily:"MetaPro-Medium",hover:true} );

function mycarousel_initCallback(carousel)
{
    jQuery('.crouselRightArrow').bind('click', function() {
        carousel.next();
        return false;

    });

    jQuery('.crouselLeftArrow').bind('click', function() {
        carousel.prev();
        return false;
    });
	
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


jQuery(document).ready(function(){


	$( '.topmenu > li > a' ).click(function(){
	
		$( '.topmenu' ).find( 'ul' ).css( 'display', 'none' );
		
		var obj = $(this).parent().find( 'ul' );
	
		if( obj.length ){
			obj.fadeIn( 300 );
			return false;
		}
		else{
			return true;
		}
	});
	
	$( document ).click( function(){
		$( '.topmenu' ).find( 'ul' ).css( 'display', 'none' );
	} );
	
	$( '.sinanGulerSolbilgi' ).mouseenter(function(){
		$( '.sinanGulerSolbilgi .playerInfoBox' ).fadeIn( 'fast' );
	});
	
	$( '.sinanGulerSolbilgi' ).mouseleave(function(){
		$( '.sinanGulerSolbilgi .playerInfoBox' ).fadeOut( 'fast' );
	});

});

jQuery(document).ready(function() {
    $( '.mainCarousel' ).jcarousel({
        auto: 2,
		scroll: 1,
        wrap: 'last',
        animation: 650, 
        initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
    });
 



   
});

