Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
}<br />
$(document).ready(function() {<br />
$('*[id*="cotidiano_"]').dialog({<br />
autoOpen : false<br />
});<br />
var comunityLoadedId = 0;<br />
$('*[id*="comunityButton_"]').click(function() {<br />
//define comunity images that will be loaded ..<br />
var id = this.id.split("_")[1];<br />
comunityLoadedId = id;<br />
var cotidianoId = $("#cotidianoId_"+id).text();<br />
$.ajax({<br />
url :<br />
"/cotidianosensitivo/recents/to/comunity/"+cotidianoId+"/limit/30",<br />
type : "GET",<br />
context : document.body,<br />
data : "json",<br />
success : loadComunityCallback<br />
});<br />
return false;<br />
});<br />
function loadComunityCallback(response) {<br />
if(comunityLoadedId != 0) {<br />
var slideshowId = "#slideshow_" + comunityLoadedId;<br />
//clear prev slideshow<br />
deactivateSlide(slideshowId);<br />
image.createdAt })<br />
$(slideshowId).html(""); // reset<br />
$.each(response.recentImages, function(index, image) {<br />
$(document.createElement("img"))<br />
.attr({ src: image.URL, title: 'Momento ' +<br />
});<br />
.appendTo(slideshowId);<br />
// show dialog<br />
var boxId ="#cotidiano_" + comunityLoadedId;<br />
$(boxId).dialog('open');<br />
// hold close event on dialog with comunity stopmotion<br />
$(boxId).bind("dialogbeforeclose", function(event, ui) {<br />
deactivateSlide(slideshowId);<br />
});<br />
//start slideshow<br />
activateSlide(slideshowId);<br />
}<br />
}<br />
$('#janelinhas, ul#icons li').hover(function() {$(this).removeClass('uistate-hover');});<br />
});<br />