jQuery(function(){
   jQuery("div.svw").prepend("<img src='../img/loader.gif' class='ldrgif' alt='loading...'/ >"); 
});
var j = 0;
var quantofamo = 0;
jQuery.fn.slideView = function(settings) {
	  settings = jQuery.extend({
     easeFunc: "easeInOutExpo",
     easeTime: 750,
     toolTip: false
  }, settings);
	return this.each(function(){
		var container = jQuery(this);
		container.find("img.ldrgif").remove(); // removes the preloader gif
		container.removeClass("svw").addClass("stripViewer");		
		var pictWidth = container.find("img").width();
		var pictHeight = container.find("img").height();
		var pictEls = container.find("li").size();
		var stripViewerWidth = pictWidth*pictEls;
		container.find("ul").css("width" , stripViewerWidth); //assegnamo la larghezza alla lista UL	
		container.css("width" , pictWidth);
		container.css("height" , pictHeight);
		container.each(function(i) {
			jQuery('#sidebar').append("<div class='stripTransmitter' id='stripTransmitter" + (j) + "'><ul><\/ul><\/div>");
			jQuery(this).find("li").each(function(n) {
                     if (n == 0) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/southerncaliforniasanitation3.resized.jpg" />'+"<\/a><\/li>");
                        jQuery("div#main p").html('<b><a href="http://www.southerncaliforniasanitation.com">Southern California Sanitation LLC</a></b> provides Porta Potty rentals and Fence rentals to Construction, Special Events, Private Parties and other uses. 24 Hour emergency service available. They also provide rentals for Luxury Units and VIP trailers.<br/><br/>Work consisted of managing the HTML, CSS, Javascript, Flash, and a few PHP functions<br/><br/><a href="http://www.southerncaliforniasanitation.com">http://www.southerncaliforniasanitation.com</a>');
                        return n++;
                     }
                     if (n == 1) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/forwardthinking3.resized.jpg" />'+"<\/a><\/li>");
                        return n++;
                     }
                     if (n == 2) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/lionsfutures3.resized.jpg" />'+"<\/a><\/li>");
                        return n++;
                     }
                     if (n == 3) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/ewantelford.resized.jpg" />'+"<\/a><\/li>");
                        return n++;
                     }
                     if (n == 4) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/itc.resized.jpg" />'+"<\/a><\/li>");
                        return n++;
                     }
                     if (n == 5) {
                        jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+'<img src="../img/arildagomez.resized.jpg" />'+"<\/a><\/li>");
                        return n++;
                     }
				});
			jQuery("div#stripTransmitter" + j + " a").each(function(z) {
			   jQuery(this).bind("click", function(){
                  jQuery(this).addClass("cur").parent().parent().find("a").not(jQuery(this)).removeClass("cur"); // wow!
                  var cnt = -(pictWidth*z);
                  container.find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
                  if (z == 0) {
                     jQuery("div#main p").html('<b><a href="http://www.southerncaliforniasanitation.com">Southern California Sanitation LLC</a></b> provides Porta Potty rentals and Fence rentals to Construction, Special Events, Private Parties and other uses. 24 Hour emergency service available. They also provide rentals for Luxury Units and VIP trailers.<br/><br/>Work consisted of managing the HTML, CSS, Javascript, Flash, and a few PHP functions<br/><br/><a href="http://www.southerncaliforniasanitation.com">http://www.southerncaliforniasanitation.com</a>');
                     return false;
                  }
                  if (z == 1) {
                     jQuery("div#main p").html('<b><a href="http://www.forwardthinking.vc/">Vision Capital Management</a></b> is an alternative investment firm specializing in managed futures. We offer investment products to institutions and high net-worth individuals who seek diversification through uncorrelated asset classes.<br/><br/>Work consisted of managing the HTML, CSS, Javascript, and PHP backend. The website was integrated with an internally created lead management system using Web Services.<br/><br/><a href="http://www.forwardthinking.vc/">htt://www.forwardthinking.vc/</a>');
                     return false;
                  }
                  if (z == 2) {
                     jQuery("div#main p").html('<b><a href="http://www.lionsfutures.com">Lions Futures</a></b> is an alternative investments brokerage specializing in Managed Futures portfolios. Their services include professional management of Commodity Trading Advisors, asset diversification through Managed Futures, select client wealth management, and self directed online trading.<br/><br/>Work consisted of managing the HTML, CSS, and PHP backend <br/><br/><a href="http://www.lionsfutures.com">http://www.lionsfutures.com</a>');
                     return false;
                  }
                  if (z == 3) {
                     jQuery("div#main p").html('<b><a target="_blank" href="http://www.ewantelford.com">Ewan Telford</a></b> is an award-winning director of commercials, music videos and films. Ewan’s film <a target="_blank" alt=" Apocalypse Oz" href="http://www.apocalypseoz.com/">Apocalypse Oz </a>(which hyrbridised the screenplays of Apocalypse Now and The Wizard of Oz) screened at festivals worldwide, won the <a target="_blank" href="http://www.imdb.com/title/tt0801820/awards">Audience Award at Filmstock International Film Festival </a>and was widely seen as the first film of it’s kind.  <br/><br/>Work consisted of creating HTML, CSS, client side scripting using JQuery for animations, a slider, and auto size adjustment to the embedded player based on the video, PHP for the contact form, and encoding videos for the embedded flash video player. The client provided a PSD for the service being provided.<br/><br/><a target="_blank" href="http://www.ewantelford.com">www.ewantelford.com</a>');
                     return false;
                  }
                  if (z == 4) {
                     jQuery("div#main p").html('<b><a target="_blank" href="http://itc.artengineered.net">ProCode</a></b> is an application that won 3<sup>rd</sup> place for the Web Applications Development event in the <a target="_blank" href="http://www.cisdept.csupomona.edu/itc/index.asp">Information Technology Competition</a> at Cal Poly Pomona on April 17, 2010. The competition gave 2 weeks to complete the project, beginning with the initial project proposal. We were considered the most innovative with our code commenting system, but we lacked the polish and finish of a feature complete site. We were about a day away from completing the application. The team consisted of 5 team members; Jaime Hernandez, Dean Sofer, Nicholas Chan, Mark Lenser and Andrew Hipp. <br/><br/>Work consisted of using the CakePHP and jQuery frameworks to create a code highlighting and commenting application. I used <a target="_blank" href="http://qbnz.com/highlighter/">GeSHi</a> to highlight and display uploaded source code files. I used the jQuery UI Selectable plugin to select code by a click and drag  interface and output the first and last line of code selected. This is just a portion of the work I put in as there was much more work being done with data modeling, the database, and patch work.<br/><br/><a target="_blank" href="http://itc.artengineered.net">itc.artengineered.net</a>');
                     return false;
                  }
                  if (z == 5) {
                     jQuery("div#main p").html('<b><a target="_blank" href="http://arildagomez.com">Arilda Gomez</a></b> is a Marriage and Family Therapy Intern. She worked currently as a Marriage and Family Therapy Trainee at San Diego Hospice Grief Care and Education Center. As a counselor she gave therapeutic services in English and Spanish to adults, children, adolescents, and families in the center\'s office, in the client\'s home, or at the client\'s school. She looks to forward to counceling her own clients in the near future. <br/><br/>Work consisted of creating HTML, CSS, and PHP for the contact form for a simple design. The site is a work in progress.<br/><br/><a target="_blank" href="http://arildagomez.com">arildagomez.com</a>');
                     return false;
                  }
                  return false;
			   });
			});
			
			
				// next image via image click	14/01/2009
				jQuery("div#stripTransmitter" + j + " a").parent().parent().parent().prev().find("img").each(function(z) {
				jQuery(this).bind("click", function(){
					var ui 	= 	jQuery(this).parent().parent().parent().next().find("a");
					if(z+1 < pictEls){
						ui.eq(z+1).trigger("click");
					}
					else ui.eq(0).trigger("click");
				   });
				});
				
				
			jQuery("div#stripTransmitter" + j).css("width" , '140px');
			jQuery("div#stripTransmitter" + j + " a:first").addClass("cur");
			if(settings.toolTip){
			container.next(".stripTransmitter ul").find("a").Tooltip({
				track: true,
				delay: 0,
				showURL: false,
				showBody: false
				});
			}
			});
		j++;
  });	
};
