jQuery.fn.log = function (msg) {
  console.log("%s: %o", msg, this);
  return this;
};

$(document).ready(function() {
	
	$('#slideShow').cycle({
	
	});
	
	$('ul.gigpress-listing li').each(function() {
		var contents = $(this).html().replace(/> in </g,'><');
		$(this).html(contents);
	});
	
	$('span.summary').remove();
	
	$('ul.gigpress-listing').cycle({
		fx: 'scrollLeft',
		speed: 200,
		pause: 1
	});
	
	
	$('#footNav li:last,#footer li:last').addClass('last');
	
	var firstImg = $('.content img:first').addClass('firstImg');
	$('.content a.more').clone(true).insertBefore(firstImg);
	$('.content a.site').clone(true).insertBefore(firstImg);
	
    $('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

	//fix stupid ie bug
	if ($.browser.msie) {}
	
/*	//ie7 only
	$.each($.browser, function(i, val) {
	  if(i=="msie" && jQuery.browser.version.substr()=="7.0")
	});
*/	
	//fix ie6 nonsense
	
	var version = jQuery.browser.version;
	if (version instanceof Object)
	    version=version.number();
	if ( jQuery.browser.msie && version < 7 ) {
		
	}

});

	var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
$(document).keydown(function(e) {
  kkeys.push( e.keyCode );
  if ( kkeys.toString().indexOf( konami ) >= 0 ){
    $(document).unbind('keydown',arguments.callee);
    $.getScript('http://www.cornify.com/js/cornify.js',function(){
      cornify_add();
      $(document).keydown(cornify_add);
    });          
  }
});