/*Attach High Slide*/

function AttachHS()
{
	linkarray = $$('.port-tn a');

	for (x=0;x<linkarray.length;x++)
	{
//	linkarray[x].href = linkarray[x].href 
	linkarray[x].onclick = function(){
		
		link = this;

		link.href = this.href+"&js=1";
	
		return hs.htmlExpand(link, { contentId: 'highslide-html-2', objectType: 'ajax'} );
		};
	}
}

/*Ajax Update Portfolio*/

function UpdateSelect()
{
	new Ajax.Updater('port-holder','portgallery.php', 
		{
		method: 'get',  
		parameters: $('port_select').serialize(true),
		/*onLoading: ($('activity-select').disabled = 'disabled',$('activity-select-option1').text = 'Loading...')*/
		onComplete: function(transport) {
			AttachHS();
		}
		}
	);
}

/* On Load */

Event.observe(window, 'load', function() {

//	$('port_select_button').style.display = 'none';

	AttachHS();

	inputarray = $$('#port_select select');

	for (x=0;x<inputarray.length;x++)
	{
	inputarray[x].observe('change',function(event){UpdateSelect();});
	}

});