Social buttons
HTML
<script src="http://platform.twitter.com/widgets.js"></script>
<link rel="stylesheet" href="http://izzyhodge.com/style.css">
<script src="http://izzyhodge.com/fancybox/jquery.fancybox.js"></script>
<link rel="stylesheet" href="http://izzyhodge.com/fancybox/jquery.fancybox.css">
<script src="http://izzyhodge.com/js/cycler.js"></script>
<body>
<div id="container">
<div id="content">
<div id="background-cycler" class="background-cycler">
<img id="imgPrev" src="" alt=""/>
<img id="imgNext" src="" alt=""/>
</div>
<div id="navbg" class="white-box">
<img id="logo" src="/images/logo.png" alt="Izzy Hodge Logo"></img>
<ul id="nav">
<li><a href="/">HOME</a></li>
<li><a href="/portfolio/">PORTFOLIO</a></li>
<li><a href="/books/">BOOKS</a></li>
<li><a href="/sketches/">SKETCHES</a></li>
<li><a href="/biography/">BIOGRAPHY</a></li>
<li><a href="/contact/">CONTACT</a></li>
</ul>
<div id="copyright">
<p style="font-size:11px;">© IZZY HODGE 2014</p>
<p style="font-size:8px;">ALL RIGHTS RESERVED</p>
</div>
</div>
<div id="page-bg" class="white-box">
<div id="thumb-container">
<a class="fancybox thumb" rel="group" href="http://izzyhodge.com/images/portfolio/large/big_1.jpg"><img src="http://izzyhodge.com/images/portfolio/thumbs/th_1.jpg" alt="<h2>LOLA LURKING IN THE LILYPADS <br/> Book Cover (Book in progress) <br/> Pencil and Digital</h2>"/></a>
<a class="fancybox thumb" rel="group" href="http://izzyhodge.com/images/portfolio/large/big_2.jpg"><img src="http://izzyhodge.com/images/portfolio/thumbs/th_2.jpg" alt="<h2>THE TREMENDOUS TAILS OF TRAVELLERS TRAILS - THE OTTER<br/>Collection published by Zeitgeist Fine Art<br/>Ink and Digital</h2>" /></a>
</div>
<div id="appendContent" style="display: none;">
<div></div>
<div><h2><a>READ POEM<img class="hoverpoem" src="/images/poems/otterpoem.png"...
CSS
.fancybox-title iframe {
min-height: 30px;
vertical-align: middle;
}
JavaScript
$(".fancybox").fancybox({
beforeShow: function () {
// Add FaceBook like button
var alt = this.element.find('img').attr('alt');
this.inner.find('img').attr('alt', alt);
this.title += alt;
var toolbar = "<div id='tools'>" + $("#appendContent div").eq(this.index).html() + "</div>";
$(".fancybox-inner").append(toolbar);
if (this.title) {
this.title += '<a href="http://pinterest.com/pin/create/button/?url='+
encodeURIComponent(document.location.href)+
'&media=http%3A%2F%2Fwww.izzyhodge.com'+
encodeURIComponent(this.href)+
'&description=Pin from IzzyHodge.com" class="pin-it-button" count-layout="horizontal">'+
'<img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
this.title += '<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="' + this.href + '">Tweet</a> ';
this.title += '<iframe src="http://www.facebook.com/plugins/like.php?href=' + this.href + '&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:23px;" allowTransparency="true"></iframe>';
}
},
afterShow: function() {
// Render tweet button
twttr.widgets.load();
},
helpers: {
title: {
type: 'inside'
}
}
});