$(document).ready(function()
{
	var scrollPane = $('.scroll-pane-holder .scroll-pane, .scroll-pane-holder .scroll-pane2');
	
	if (scrollPane.length > 0){
		scrollPane.jScrollPane({scrollbarWidth:8, scrollbarMargin:2, showArrows: true});
	}

	$("#hdr-left .box .sn-icon").tooltip({
		offset: [-8, -90],
		// use the "slide" effect
		effect: 'slide'
	// add dynamic plugin with optional configuration for bottom edge
	}).dynamic({ bottom: { direction: 'down', bounce: true } });

});

ClientView = {
	menuOver: function(menuItem) {
		this._menuOverOut($(menuItem).children("img"), true);
	},
	menuOut: function(menuItem) {
		this._menuOverOut($(menuItem).children("img"), false);
	},
	subMenuOver: function(menuItem) {
		this._menuOverOut($(menuItem).children(".title").find("img"), true);
		this._menuOverOut($(menuItem).children(".text").children(".cross").find("img"), true);
	},
	subMenuOut: function(menuItem) {
		this._menuOverOut($(menuItem).children(".title").find("img"), false);
		this._menuOverOut($(menuItem).children(".text").children(".cross").find("img"), false);
	},
	menuItemOnclick: function(menuItem) {
		
	},
	_menuOverOut: function(img, over) {
		var str1 = "img-";
		var str2 = "img-";
		
		if (over)
			str2 = "img-over-";
		else
			str1 = "img-over-";
		
		imgSrc = img.attr("src");
		img.attr("src", imgSrc.replace(str1, str2));
		
	}
};
