/*
jquery: .active-ttab
*/

jQuery.fn.ttabs = function(options){
	
	var options = jQuery.extend({

	    activeClass: 'active-ttab' // Aktif Etme Kısımı
	   
	  },options);
	
	return this.each(function() {
			
		$(this).find('.tt-panel:first').show(0);
		$(this).find('.index-tabs span:first').addClass(options.activeClass);
		
		$(this).find('.index-tabs span').click(
			function() {
				$(this).parent().parent().find('.index-panel .tt-panel').css({'display':'none'});
				var numEl= $(this).index();
				$(this).parent().parent().find('.index-panel .tt-panel').eq(numEl).css({'display':'block'});
				$(this).parent().find('span').removeClass(options.activeClass);
				$(this).addClass(options.activeClass);
				return false;
			}
		);
		
	});
	
};
