/* Author: S Marjason

*/

$("#nav").css("margin-left", "-95px");
$("#nav").hover( 
  function () {
    $(this).animate({ marginLeft: "0px" }, { duration: 200, queue: false });
  },
  function () {
    $(this).animate({ marginLeft: "-95px" }, { duration: 50, queue: false });
  }
);

/*  from css-tricks.com */
$('a').each(function() {
   var a = new RegExp('/' + window.location.host + '/');
   if(!a.test(this.href)) {
       $(this).click(function(event) {
           event.preventDefault();
           event.stopPropagation();
           window.open(this.href, '_blank');
       });
   }
});

$("#twitter").getTwitter({
					userName: "WeltBrand",
					numTweets: 2,
					loaderText: "Loading tweets...",
					slideIn: true,
					slideDuration: 750,
					showHeading: true,
					headingText: "",
					showProfileLink: false,
					showTimestamp: true
				});

if ($("#sd_feed").length) {
$('#sd_feed').rssfeed('http://feeds.feedburner.com/WeltBranding', {
	limit: 1,
	header: false,
	linktarget: '_blank'
});
};

if ($("#gn_feed").length) {
$('#gn_feed').rssfeed('http://generationnerd.weltbranding.com/feed/', {
	limit: 1,
	header: false,
	linktarget: '_blank'
});
};

if ($("#gf_feed").length) {
$('#gn_feed').rssfeed('http://gnomeflash.com/feed/', {
	limit: 1,
	header: false,
	linktarget: '_blank'
});
};

 if ($("#hlo_feed").length) {
$('#hlo_feed').rssfeed('http://generationnerd.weltbranding.com/feed/', {
	limit: 3,
	header: false,
	content: false,
	snippet: false,
	date: false,
	titletag: 'p',
	linktarget: '_blank'
});
};

 if ($("#hlo_feed2").length) {
$('#hlo_feed2').rssfeed('http://gnomeflash.com/feed/', {
	limit: 3,
	header: false,
	content: false,
	snippet: false,
	date: false,
	titletag: 'p',
	linktarget: '_blank'
});
};

 if ($("#hlo_feed3").length) {
$('#hlo_feed3').rssfeed('http://feeds.feedburner.com/WeltBranding', {
	limit: 3,
	header: false,
	content: false,
	snippet: false,
	date: false,
	titletag: 'p',
	linktarget: '_blank'
});
};

if ($("#portfolio_scroller").length) {
$("#portfolio_scroller").mCustomScrollbar("horizontal",500,"easeOutCirc",1,"fixed","yes","yes",20); 
};

if ($(".tabs").length) {
$(".tabs").tabs({ fx: { opacity: 'toggle' } });
};

