

$(document).ready(function(){

	//longDiv();
	
	/*
	$('.gallery .items a').gsom({
		scroll: false
	})
	*/	
});



$.fn.gsomtree = function(){
	var tree = this;
	
	var triggers = $('>li span', tree);
	
	triggers.click(swap);
	
	function swap() {
		var p = $(this).closest('li');
		var ul = $('ul', p);
		
		ul.toggle();
		return false;
	}
	
}


function titling() {
 	imgs = $('img[title]');
 	imgs.each(function(){
		src = this.src;
		text = this.title;
		w = 2 + 2 * parseInt($(this).css('marginLeft')) + 2 * parseInt($(this).css('paddingLeft'));
		w = (w + $(this).width()).toString() + 'px;';
		
		//f = ($(this).css('float').toString());
		f = $(this).css('float');
		style = 'text-align: center;' + 'width:' + w  + 'float:' + f;
	 
		div = '<div class="titled" style="' + style + '"><img src="' + src +'" alt=""/>'+ text + '</div>';
		
	 	$(this).replaceWith(div);
 	})
 
 }
 

 
