$(document).ready(function(){
				$('body').pngFix();
				
					
				
				
				// only load http social widgets if on http. Don't if on https
				var protocol = $(location).attr("protocol");
				
				if(protocol == "http:")
				{	
					// tweet
					$.ajax({
				        type: "GET",
				        url: '/tweet.html', 
				        dataType: "html",
				        success: function(html) {
				           $('div#sharebuttontweet').html(html); // Load the HTML snippet into a DIV with an id of myContent
				        }
					});
					
					//pin it
					(function() {
					    window.PinIt = window.PinIt || { loaded:false };
					    if (window.PinIt.loaded) return;
					    window.PinIt.loaded = true;
					    function async_load(){
					        var s = document.createElement("script");
					        s.type = "text/javascript";
					        s.async = true;
					        s.src = "http://assets.pinterest.com/js/pinit.js";
					        var x = document.getElementsByTagName("script")[0];
					        x.parentNode.insertBefore(s, x);
					    }
					    if (window.attachEvent)
					        window.attachEvent("onload", async_load);
					    else
					        window.addEventListener("load", async_load, false);
					})();
					
					var _url = $(location).attr('href');
					var _media;
					for(var i = 0; i < $('#page-content img').length; i++)
					{
						if($('#page-content img').eq(i).attr('src')!="/images/frontpage-sale-tags/sale60x60.png")
				        {
				        	_media = 'http://www.dupenny.com/' + $('#page-content img').eq(i).attr('src');
				        	break;
				        }
					}
					
					var _desc =  $('#page-content p').first().text();
					
					var _button = '<a href="http://pinterest.com/pin/create/button/?url=' + _url + '&media=' + _media + '&description=' + _desc + '" class="pin-it-button" count-layout="horizontal">Pin It</a>'
					$('#pinitbutton').html(_button);
				}
				
				
					
				
			});
		
			
