function showmap(mylong,mylat,mypinimage)
{
	var myzoom = 16;
	var mycenter = new google.maps.LatLng(mylong,mylat)

	var mapoptions = {
		zoom: myzoom,
		center: mycenter,
		mapTypeControl: false,
		streetViewControl: true,
		navigationControl: true,
		scaleControl: false,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	
	var mymap =		new google.maps.Map(document.getElementById("map_canvas"), mapoptions);

	
	var myimage =	new google.maps.MarkerImage(mypinimage,						 
					new google.maps.Size(100,140),
					new google.maps.Point(0,0),
					new google.maps.Point(74,109));
	
	var pinmarker = new google.maps.Marker({
		position: mycenter,
		map: mymap,
		icon: myimage
	});
}



$(function()
{
	
	if ($('body.home #slider').length)
	{
		$("body.home #slider").slides(
		{
			preload: true,
			effect: 'fade',
			fadeSpeed: 300,
			play: 8000,
			crossfade: true,
			generatePagination: false,
			generateNextPrev: false
			//preloadImage: '/loading.gif'
			//hoverPause: true
			//randomize: true
		});
	}

	if ($('body.single #slider').length)
	{
		$("body.single #slider").slides(
		{
			preload: true,
			effect: 'fade',
			fadeSpeed: 300,
			play: 8000,
			crossfade: true,
			generatePagination: false,
			generateNextPrev: false
			//autoHeight: true
			//preloadImage: '/loading.gif'
			//hoverPause: true
			//randomize: true
		});
	}
	

	if ($('ul.filter').length)
	{
		$('ul.filter li a').click(function() 
		{
			// handles
			//var foliofilter		= $(this);
			var foliofilterval	= $(this).parent().attr('id');
			
			// decorate links
			$(this).css('outline','none');
			$('ul.filter li.current').removeClass('current').animate({'paddingLeft': '0px'}, 200);
			$(this).parent().addClass('current').animate({'paddingLeft':'+=10px'}, 200);
			
			// filter portfolio items
			$('ul#items').fadeOut(100, function() 
			{
				$('ul#items li').each(function() 
				{
					if($(this).hasClass(foliofilterval)) 
					{
						$(this).show();
					}
					else
					{
						$(this).hide();
					}
				});

				//$('ul#items').reorder();
				
			});

			$('ul#items').fadeIn(200);
			
			return false;
		});
	}

	
	if ($('ul.grid').length)
	{
		
		$('ul.grid li a').hover(function()
		{
			//$(this).find('span.overlay').fadeIn('fast');

			$(this).attr('title','');

			$(this).find('span.overlay').stop().animate({'opacity': '1.00'}, 200);
		}, 
		function() 
		{
			//$(this).find('span.overlay').fadeOut('fast');

			$(this).find('span.overlay').stop().animate({'opacity': '0.00'}, 200);
		});

	}

});
