
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  arguments.callee = arguments.callee.caller;  
  if(this.console) console.log( Array.prototype.slice.call(arguments) );
};
// make it safe to use console.log always
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


// place any jQuery/helper plugins in here, instead of separate, slower script files.

/* jQuery UI */
$(document).ready(function(){
	/* Lof SliderNews */
    $obj = $('#headerEmotionImage').lofJSidernews( { interval : 5000,
    										direction		: 'fade',
    									 	easing			: 'easeInOutCubic',
    										duration		: 900,
    										auto		 	: true,
    										maxItemDisplay  : 3,
    										navPosition     : 'horizontal', // horizontal
    										navigatorHeight : 32,
    										navigatorWidth  : 82,
    										mainWidth: 765
    										} );	

	/* Slides */
	// hide all slides
	$(".slides .slide_body").hide();
	//toggle message_body
	$(".slide_head").click(function(){
		$(this).next(".slide_body").slideToggle(500);
		$(this).toggleClass('up_arrow');
		return false;
	});
	
	/* Tabs */
	$('#tabs div').hide(); // Hide all divs
	$('#tabs div:first').show(); // Show the first div
	$('#tabs ul li:first').addClass('active'); // Set the class of the first link to active
	$('#tabs ul li a').click(function(){ //When any link is clicked
		$('#tabs ul li').removeClass('active'); // Remove active class from all links
		$(this).parent().addClass('active'); //Set clicked link class to active
		var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
		$('#tabs div').hide(); // Hide all divs
		$(currentTab).show(); // Show div with id equal to variable currentTab
		return false;
	});

});


