$(function () {
  var links = [];
  var linkContainers = [];
  $('div.links a').each(function () {
    // note that this only compares the pathname, not the entire url
    // which actually may be required for a more terse solution.
//    if (this.pathname == window.location.pathname) {
      links.push(this);
      linkContainers.push($(this.hash).get(0));
//    }
  });	
	
	
  $(document).ready(function() {
    var flashvars1 = {
      id:'oi'
    };
    var flashvars2 = {
      id:'backbay'
    };    
    var params = {
      menu: "false",
      bgcolor: "#ffffff;",
      allowScriptAccess: "sameDomain",
      allowFullScreen: "false"
    };
    var attributes = { };		
		
    swfobject.embedSWF("flash/slideshow.swf", "oi", "322", "237", "9.0.150", "flash/expressInstall.swf", flashvars1, params, attributes);
    swfobject.embedSWF("flash/slideshow.swf", "backbay", "322", "237", "9.0.150", "flash/expressInstall.swf", flashvars2, params, attributes);
  });
  
  $(links).click(function () {
    // hide all tabs
	$(linkContainers).hide().filter(this.hash).show();
	
	if(this.hash == '#pretend')
	{
//		$('#image_view img').attr('src', 'uploads/assets/education/pretend_01.jpg');
		$('#image_view').html('<img src="uploads/assets/education/pretend_01.jpg"/>');
	}
	if(this.hash == '#wyland')
	{
//		$('#image_view img').attr('src', 'uploads/assets/education/wyland_mobile_class.jpg');
		$('#image_view').html('<img src="uploads/assets/education/wyland_mobile_class.jpg"/>');
	}
	if(this.hash == '#birch')
	{
//		$('#image_view img').attr('src', 'uploads/assets/education/birch_01.jpg');
		$('#image_view').html('<img src="uploads/assets/education/birch_01.jpg"/><br/><br/>'
				+ '<img src="uploads/assets/education/birch_02.jpg"/><br/><br/>'
				+ '<img src="uploads/assets/education/birch_logo.png"/>');
	}	
	
    // set up the selected class
    $(links).removeClass('selected');
    $(this).addClass('selected');  
    return false;
  });  
	

});