jQuery(function () {
  
	// Creating custom :external selector
	jQuery.expr[':'].external = function(obj) {
		return  obj.href.match(/^https?\:\/\//) && !obj.href.match(/^#/) && !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
	};
	 
	 // Add 'external' and '_blank' CSS class to all external links
	 jQuery("a:external")
		.attr({target: "_blank"})
		.addClass('external');
		
	if (!jQuery.browser.msie) 
		jQuery("a:external:not(:has(img))")
			.append('<sub style="font-size:1em;font-weight:normal;text-decoration:none;padding:0 0 0 0;line-height:0em;font-style:normal;">↗</sub>');
			//.each(function () { str2+=jQuery(this).attr('href')+"\n"; });
	
});

// sik-sm ICONS
jQuery(function(){var a={m:{facebook:[0,0,0,50],twitter:[55,0,0,50],gplus:[110,0,0,50],linkedin:[164,0,1,50],lastfm:[218,0,0,50],runkeeper:[274,0,0,50],flickr:[328,0,1,50],email:[383,0,0,50],msn:[437,0,1,50],rss:[492,0,1,50],skype:[547,0,0,50],vimeo:[602,0,0,50],youtube:[656,0,0,50]},img:"/wp-content/themes/siknus/images/social-icons.png"};jQuery(".sik-sm li").each(function(){$this=jQuery(this);var c="",b=$this.attr("class").split(" ");for(i=0;i<b.length&&c=="";i++){if(b[i].substr(0,3)=="sm-"){c=b[i].substr(3)}}if(c==""){$this.remove()}else{var e=a.m[c];$this.css({display:"block","float":"left",width:"50px",height:"50px",margin:"0 5px 5px 0",listStyle:"none",background:"transparent url('"+a.img+"') no-repeat -"+e[0]+"px -"+e[1]+"px"});jQuery("a",this).html("").data("sm",e).css({display:"block",width:"50px",height:"50px",opacity:0,background:"transparent url('"+a.img+"') no-repeat -"+(e[0]+e[2])+"px -"+(e[1]+e[3])+"px"}).hover(function(){$this=jQuery(this);$this.stop();$this.animate({opacity:1},800,"easeOutQuad")},function(){$this=jQuery(this);$this.stop();$this.animate({opacity:0},600,"easeInQuad")})}})});
