Cufon.replace('#topnav, .blogtitle , #footer h4, #youtube strong, #facebook strong, #twitter strong');
Cufon.replace('#content h3, #content h4, .title',{color: '#6b69c2'});
Cufon.replace('#on-media h4',{color: '#b87bbe'});
Cufon.replace('#other-blogs h4',{color: '#ff0204'});
Cufon.replace('#videoviewerParent .title',{color: '#fff'});



$(document).ready(function() {
	$('.cl3 .post').hover(function(){
	    	$(".overlay", this).stop().animate({top:'10px'},{queue:false,duration:160});
		}, function() {
	    	$(".overlay", this).stop().animate({top:'171px'},{queue:false,duration:160});
	    }).click(function(){
	    	var href = $(this).find("a").attr('href');
	    	location.href = href;
	    })
	    
	    
	$('.blogitem').click(function(){
		var href = $(this).find('a').attr('href');
		window.location.href = href;
	});
	
	
	
	var _videoClicked = false;
	var _videoLoaded = '';
	var _videoContent = '';
	var _videoStyle ='';
	
	
	$("#on-media .overlay, .videoplay").live('click',function(e){
		var parent = $(this).closest('.videoviewer');
		var videoURL = parent.find('a').attr('rel');
		var video = parent.attr('id');	
		if (_videoClicked){
			$('#'+_videoLoaded).html(_videoContent);
			Cufon.refresh();
		}
		_videoContent = $('#'+video).html();
		var code = '<embed width="350" height="295" type="application/x-shockwave-flash" src="'+ videoURL +'" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars=""/>';
		$('#'+video).html(code);
	    _videoClicked = true;
	    _videoLoaded = video;
	    e.preventDefault();
    });
	



	function restoreSlides(){
		if (_videoClicked){
			$('#'+_videoLoaded).html(_videoContent);
			Cufon.refresh();
		}
	}

		
	$("#videoviewerParent").cycle({ 
	    fx:     'fade', 
	    speed:  300, 
	    timeout: 3000, 
	 	pause: 1,
	    pager:  '#nav',
	    after: restoreSlides
	});
	
	
    $('#vouleftikes-slider').cycle({
    	fx: 'fade',
    	pause: 1,
    	speed: 300,
    	timeout: 8000,
    	pager: '#vouleftikes-pager',
		pagerAnchorBuilder: function(idx, slide) {
    		return '<a href="#">&bull;</a>';
   		}
    });	



	
});

