function sharePopup(d){
	var sharebox = document.getElementById(d);

	if (sharebox != null) {
		if (sharebox.style.display == 'none') {		
			sharebox.style.display='block';
		}
		else {
			sharebox.style.display='none';
		}
		return false;
	}
}


function sharePopupArt2(d){
	var sharebox = document.getElementById(d);

	if (sharebox != null) {
		if (sharebox.style.display == 'none') {		
			sharebox.style.display='block';
		}
		else {
			sharebox.style.display='none';
		}
		return false;
	}
}

/* Ensure Facebook counter appears even when count is 0 */
jQuery(document).ready(function(){
  jQuery("span.fb_share_no_count").each(function(){
    jQuery(this).removeClass("fb_share_no_count");
    jQuery(".fb_share_count_inner", this).html("0");
  });
});

/* Twitter users to recommend */

  	var twList = ['bedavafilmizle'];
	var tw2 = twList[Math.floor(Math.random() * twList.length)];


function showShare(d){
	uart2 = "http://girbi.net/b" + d;
	yuart2=document.location.pathname;
	tart2=document.title;

	document.writeln('<div class=\"pitoolsBot\" style=\"margin-bottom: 8px; position: relative; height: 112px;\"><div class="pitools1Bot">');
	document.writeln('<div class=\"piShareToolsBot\">');
	document.writeln('<a target=\"_blank\" href=\"http://buzz.yahoo.com/buzz?targetUrl=http://www.girbi.net' + encodeURIComponent(yuart2) + '"\><img src=\"http://www.girbi.net/img/yahoobuzz.png\" border=\"0\" height=\"30\" width=\"30\" alt=\"\" title=\"Yahoo Buzzla\"></a>');
	document.writeln('<a href=\"javascript:void(window.open(\'http://www.myspace.com/Modules/PostTo/Pages/?u='+encodeURIComponent(document.location.toString()),'ptm','height=450,width=440\').focus())\"><img src=\"http://cms.myspacecdn.com/cms/ShareOnMySpace/square.png\" border=\"0\" height=\"30\" width=\"30\" alt=\"Share on MySpace\"></a>');
	document.writeln('</div>');

	/* output new social network tools */
	document.writeln('<div id=\"socialtoolsB\" style=\"width: 180px; position: absolute; height: 80px;\">')
	document.writeln('<div id=\"relatedsharetools\">');
	document.writeln('<div id=\"relatedfb\"><a name=\"fb_share\" type=\"box_count\" href="http://www.facebook.com/sharer.php\" share_url=\"' + ('http://www.girbi.net' + yuart2) + '\">Paylas</a><script src=\"http://static.ak.fbcdn.net/connect.php/js/FB.Share\" type=\"text/javascript\"></script>');
	document.writeln('<style>.fb_share_no_count {display:block;}</style></div>');

	document.writeln('<div id=\"relatedtweet\"><a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"vertical\" data-via=\"bedavafilmizle\" data-related=\"' + tw2 + '\" data-url=\"http://www.girbi.net'+ yuart2 +'\">Tweet</a><scr' + 'ipt type="text/javascr' + 'ipt" src=\"http://platform.twitter.com/widgets.js\"></scr' + 'ipt></div>');
	document.writeln('</div>');

document.writeln('<div id=\"fbLikeBox\"><div id=\"fbLikeBoxLabel\">Begendiniz mi?</div><iframe src=\"http://www.facebook.com/plugins/like.php?href=' + encodeURIComponent('http://www.girbi.net' + yuart2) + '&amp;layout=standard&amp;show_faces=false&amp;width=180&amp;action=recommend&amp;colorscheme=light&amp;height=30\" scrolling=\"no\" frameborder=\"0\" style=\"border: none; overflow:hidden; width:180px; height:30px; position: absolute; left: 8px;\" allowTransparency=\"true\"></iframe></div>');


	document.writeln('</div></div></div>');

}

function showShareI(d,u,t){
	uart2 = "http://girbi.net/b" + d;
	tart2= t;

	document.writeln('<div class="pitoolsBot" style="margin-bottom: 8px;"><div class="pitools1Bot">');
	document.writeln('<a href="#" onclick="sharePopupArt2(\'artshare2' + d + '\');return false" id="savesharebutton"><img src="http://www.seattlepi.com/art2/photogalleries/plus_small.gif" border="0" alt="" title="Share"/></a>');
	document.writeln('<a href="http://buzz.yahoo.com/buzz?targetUrl=' + encodeURIComponent(u) + '"><img src="http://l.yimg.com/ds/orion/1.0.8/img/badge-logo.png" border="0" alt="" title="Buzz it up"></a>');
	document.writeln('</div><div class="pitools2Bot">');
	document.writeln('<div class="artsharecont" id="artshare2' + d + '"><div class="artshareBot"><div class="artsharelabel"><a href="#" onclick="return sharePopupArt2(\'artshare2' + d + '\');return false;">Close</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://del.icio.us/post?url=' + encodeURIComponent(uart2) + '&title=' + encodeURIComponent(tart2) + '" ><img src="http://www.seattlepi.com/rss/delicious.gif" alt="del.icio.us" border="0" class="sicon"/>de.licio.us</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://digg.com/submit?phase=2&URL=' + encodeURIComponent(uart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/digg.gif" alt="Digg" border="0" class="sicon"/>Digg</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://www.facebook.com/sharer.php?u=' + encodeURIComponent(uart2) + '&t=' + encodeURIComponent(tart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/facebook.gif" alt="Facebook" border="0" class="sicon"/>Facebook</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://www.newsvine.com/_wine/save?aff=seattlepi&h=' + encodeURIComponent(tart2) + '&u=' + encodeURIComponent(uart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/button_seednewsvine.gif" alt="Newsvine" border="0" class="sicon"/>Newsvine</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://www.reddit.com/submit?url=' + encodeURIComponent(uart2) + '&title=' + encodeURIComponent(tart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/reddit.png" alt="Reddit" border="0" class="sicon"/>Reddit</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://www.stumbleupon.com/submit?url=' + encodeURIComponent(uart2) + '&title=' + encodeURIComponent(tart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/stumbleupon.gif" alt="StumbleUpon" border="0" class="sicon"/>StumbleUpon</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=url=' + encodeURIComponent(uart2) + '&title=' + encodeURIComponent(tart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/google.gif" alt="Google Bookmarks" border="0" class="sicon"/>Google Bookmarks</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + encodeURIComponent(uart2) + '&t=' + encodeURIComponent(tart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/yahoomyweb.gif" alt="Yahoo MyWeb" border="0" class="sicon"/>Yahoo MyWeb</a></div>');
	document.writeln('<div class="artsharelink"><a target="_blank" href="http://twitter.com/home?status=' + encodeURIComponent(tart2) + ' ' + encodeURIComponent(uart2) + '" style="margin-left: 2px;"><img src="http://www.seattlepi.com/rss/twitter.gif" alt="Twitter" border="0" class="sicon"/>Twitter</a></div>');
	document.writeln('</div></div>')
	document.writeln('</div></div>')
	var shareboxtmp = document.getElementById('artshare2'+d);
	shareboxtmp.style.display='none';
}





