var general = { 
	
	// OnLoad functions
	init: function(){
		this.bubbleEvt();
	},
	
	bubbleEvt: function() { 
		/*
		$("*").click(function(){
			general.functionName();
			return false;
		});*/
		
		
		
		$.expr[':'].external = function(obj){ 
				return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname) && !obj.href.match(/megrastudio/);     
		};
		
		$('.main-content a:external').after('<span class="external-link"></span>&nbsp;');
		
		
		$(".startpage-box-list").addClass("hover-row");
		
		
		$('.startpage-box-list li:has(a)').hover(function() {																				 
				$(this).attr("title",$(this).find("a:first").attr("title"));
  		    $(this).addClass('hover'); 
				}, function() {
  		    $(this).removeClass('hover');
		});
		
		$('.startpage-box-list li:has(a)').click(function() {
  		  window.location = $(this).find("a:first").attr("href");
				return false;
		});
		
		$('#back-button').click(function() {
  		    history.go(-1);
            return false;
		});
		
	    /*general class clickable that finds first link and redirects to that url*/
		$(".clickable").click(function() {
		    window.location = $(this).find("a:first").attr("href");
        });
	    /*/general class clickable*/

	    /*general class clickable that with status, title & hover*/
		$(".clickable").hover(function() {
		    $(this).attr("title",$(this).find("a:first").attr("title"));
		    $(this).addClass("hover");
        }, function() { 
		    $(this).removeClass("hover");
        }); 
	    /*/general class clickable*/

	},
	
	functionName: function(e) {
		//do things
	}
		
}

$(document).ready(function(){			   
	general.init();
});
