(function($) {

	// jQuery searchValue 1.0
	$.fn.searchValue=function(){var a=$(this);var b=a.val();a.focus(function(){if(a.val()==b)a.val('')});a.blur(function(){if(a.val()=='')a.val(b)});return this};

})(jQuery);

var accordeon = {
	init : function() {
	
		this.controller = API.frameControllers.New('frameContainer', 'v2');
	
	},
	addFrame : function(url, sequence, containerId, buttonId) {
			
		var frame = this.controller.addFrame();
		frame.setContainerById(containerId);
		frame.setContentByRPC(url);
		frame.keep = true;
		
		if(!sequence) {
			
			var container = frame.container;
			container.style.height = '256px';
			container.style.display = 'block';
			
			frame.addEffect(new frameController_v2_slideEffect('height', .25, 30, 0, 256,null,100));
			
		} else {
			
			frame.addEffect(new frameController_v2_slideEffect('height', .25, 30, 0, 256));

		};
		
		document.getElementById(buttonId).onclick = function() {
			
			if(!frame.shown)
				frame.controller.Show(frame.id);
				
			return false;
			
		};
		
	},
	load : function() {

		this.controller.Load();

	}
};

$(function() {
	
	$('#search input[type=text]').searchValue();
	
});