
var Sones = function () {
	var $ = jQuery;
	var breadcrumbMod = false;
	return {
		init: function() {
			var instance = this;
			
			instance.handleSidebar();
			instance.handleBreadcrumb();
		},
		handleSidebar: function() {
			/*
			var instance = $("#newsbox-reader .newsbox_news_1 span");
			instance.addClass("show");
			instance = $("#newsbox-reader .newsbox_news_1 .readmore");
			instance.addClass("show");
			
			var newsBox = $('#newsbox-reader');

			newsBox.find('li').hoverIntent (
				{
					over: function () {
						newsBox.find('li .readmore').removeClass("show");
						newsBox.find('li span').removeClass("show");						
						var instance = $(this);
						instance.find('span').addClass("show");
						instance.find('.readmore').addClass("show");
					},
					out: function () {
					}					
				}
			)
			*/


			jQuery('#newsbox-reader').accordion({
				header: 'h6',
				event: 'mouseover'});	


		
		},
		handleBreadcrumb: function() {
			if (!breadcrumbMod)
			{
				breadcrumbMod = true;
				var instance = $(".portlet-breadcrumb .portlet-breadcrumb-info");
				if (themeDisplay.getLanguageId() == "de_DE") {
					instance.html("Sie befinden sich hier: ");
				} else {
					instance.html("You are here: ");
				}
				instance.css("padding-right", "4px");
				instance.css("float", "left");
				instance = $(".portlet-breadcrumb .portlet-breadcrumb-content");
				instance.css("float", "left");
			}
		}		
	};
}();

jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
		Sones.init();
	}
);

Liferay.Portlet.ready(

	/*
	This function gets loaded after each and every portlet on the page.

	portletId: the current portlet's id
	jQueryObj: the jQuery wrapped object of the current portlet
	*/

	function(portletId, jQueryObj) {
	}
);

jQuery(document).last(

	/*
	This function gets loaded when everything, including the portlets, is on
	the page.
	*/

	function() {
	}
);
