$(document).ready(function()
{	
	$(".main-nav li").hover(
	function()
	{  
		$(this).find("ul").fadeIn("fast");
		$(this).hover(
		function()
		{
		},
		function()
		{   
			$(this).find("ul").fadeOut("slow");
		});  
    });
	
	
	
	jQuery(function($) {
    $('a[href$=".pdf"]').attr('target', '_blank');
	$("a[href$=.zip]").attr('target','_blank');
	$("a[href$=.rar]").attr('target','_blank');
	$("a[href$=.txt]").attr('target','_blank');
	$("a[href$=.doc]").attr('target','_blank');
	$("a[href$=.docx]").attr('target','_blank');
	$("a[href$=.xls]").attr('target','_blank');
	$("a[href$=.xlsx]").attr('target','_blank');
	$("a[href^='http:']").not("[href*='resolutionmag.com']").attr('target','_blank');
});




});



	PEPS = {};
	PEPS.rollover =
	{
	   init: function()
	   {
		  this.preload();
		  $(".main-nav").hover(
			 function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); },
			 function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
		  );
	   },
	   preload: function()
	   {
		  $(window).bind('load', function() {
			 $('.main-nav').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(this).attr('src') ) ); });
		  });
	   },
	   newimage: function(src)
	   {
		  return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '-roll' + src.match(/(\.[a-z]+)$/)[0];
	   },
	   oldimage: function(src)
	   {
		  return src.replace(/-roll\./, '.');
	   }
	};
	
// Swap Cover Picture
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
function doPic(imgName)
{
	if (ns3up || ie4up)
	{
		imgOn = ("" + imgName);
		document.mainpic.src = imgOn;
   }
}

function MM_goToURL()
{
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
