﻿// JavaScript Document




jQuery(document).ready(function(){
	
	jQuery(".stripeMe tr:odd").addClass("alt");	
	
	jQuery('.swapMouseover').preload({
		find: '_off',
		replace: '_on'
	});					
	
	jQuery(".swapMouseover").hover(
	  function () {
		jQuery(this).attr("src", jQuery(this).attr("src").replace("_off", "_on"));
	  }, 
	  function () {
		jQuery(this).attr("src", jQuery(this).attr("src").replace("_on", "_off"));
	  }
	);   		
	jQuery(".colQuestionContent").hover(
		  function () {
			jQuery(this).children("a").children("img").attr("src", jQuery(this).children("a").children("img").attr("src").replace("_off", "_on"));
		  }, 
		  function () {
			jQuery(this).children("a").children("img").attr("src", jQuery(this).children("a").children("img").attr("src").replace("_on", "_off"));
		  }			  
	);   		
	
	jQuery(".colQuestionContent").click(function(){
		window.location = jQuery(this).children("a").attr("href");								   }
	); 

	//tooltip();

	jQuery("#demo img[title]").tooltip({
		tip: '#demotip', 
		offset: [22, 40] // the tooltip position					  
	}); 
	/*jQuery("a.trigger").click(function(event){
		var title= jQuery(this).attr("title");		
		var rel = "";
		if(title){
			rel ="lightbox["+title+"]']:first";
		}
		jQuery("a[rel='lightbox[gallery191]']").click();	
		event.preventDefault();
	}); */
// select the thumbnails and make them trigger our overlay 
	$("a.trigger").each(function(){
		var title= $(this).attr("title");	
	
		$("#g"+title+" a").overlay({ 
	 		
			// each trigger uses the same overlay with the id "gallery" 
			target: '#gallery'+title, 
		 
			// optional exposing effect 
			expose: '#f1f1f1' 
		 
			// let the gallery plugin do its magic! 
			}).gallery({ 
			// the plugin accepts its own set of configuration options 
			speed: 800 
		});
	
	});
	$("a.trigger").click(function(event){
		var title= $(this).attr("title");	
		var first=$("#g"+title+" a:first");
		first.click();	
		event.preventDefault();
	});
	

});

