// remap jQuery to $
(function($){ })(this.jQuery);


// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};


// catch all document.write() calls
(function(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);








/*
==================================================== Tabs
*/	

$(".tab_content").hide(); 
$("ul.tabs li:first").addClass("active").show();
$(".tab_content:first").show(); 

$("ul.tabs li").click(function() {

	$("ul.tabs li").removeClass("active"); 
	$(this).addClass("active"); 
	$(".tab_content").hide(); 

	var activeTab = $(this).find("a").attr("href"); 
	$(activeTab).fadeIn(); 
	return false;
});






/*
==================================================== equal height

	
$(function() {
	var mainH = $('#main').height();
	var sideH = $('#sidebar').height();
	
	if (mainH < sideH) { 
		$('#main').height(sideH); 
	} else {
		$('#sidebar').height(mainH); 
	}
	
});
*/	
/*
=================================== images overlay
*/


$('.screens a').click( function() {
	var imgsrc = $(this).attr('href');
	$('.dark-bg').fadeIn();
	$('.dark-bg').append('<img class="overlay-img r-5 shd" src="" />');
	$('.dark-bg .overlay-img').attr('src', imgsrc);
	return false;
});

$('.dark-bg').click( function() {
	$(this).fadeOut();
	$(this).children().remove();
});























		

				
		
    
   
		
	

	
	
	
	
	




