if (plexData == undefined) { var plexData = new Array(); } plexData.push( { "json_source" : "/814188f47e4fa43e6db4c5926b5a58ed/utility/plexus_json/314510", "id" : "314510", "lmi" : "11759909", "title" : "Conservative Party - Canada Election 2008 Swing Ridings Most Likely to Win", "subtitle" : "Where should Conservative swing votes go?", "description" : "Vote for as many ridings as you want. You can also add a riding you think should be there.", "link" : "/814188f47e4fa43e6db4c5926b5a58ed/conservativeelection2008", "type" : "Text", "num_results" : "1000000", "lensmaster" : "gerrykirk", "lensmaster_link" : "/814188f47e4fa43e6db4c5926b5a58ed/lensmasters/gerrykirk", "thumbnails" : "no", "items" : [{"id" : "2485716", "title" : "Brampton West","points" : "1", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485760", "title" : "Don Valley West","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485761", "title" : "Kenora","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485762", "title" : "London-Fanshawe","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485763", "title" : "Mississauga-Erindale","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485764", "title" : "Mississauga South","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485765", "title" : "Mississauga-Streetsville","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485766", "title" : "Newmarket-Aurora","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485767", "title" : "Nipissing-Timiskaming","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485768", "title" : "Oak Ridges-Markham","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485769", "title" : "Oakville","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485770", "title" : "Ottawa South","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485771", "title" : "Welland","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485772", "title" : "Montmorency-Charlevoix-Haute Cote-Nord","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485790", "title" : "Outremont","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485791", "title" : "Québec","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485792", "title" : "Richmond-Arthabaska","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485793", "title" : "Saint-Maurice-Champlain","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485794", "title" : "Shefford","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485795", "title" : "Sherbrooke","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485796", "title" : "Trois Rivières","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485797", "title" : "Vaudreuil-Soulanges","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485798", "title" : "Esquimalt-Juan De Fuca","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485799", "title" : "Newton-North Delta","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485800", "title" : "New Westminster-Coquitlam","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485801", "title" : "North Vancouver","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485802", "title" : "Richmond","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485803", "title" : "Surrey North","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2485804", "title" : "Vancouver Island North","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486036", "title" : "Elmwood-Transcona ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486038", "title" : "Palliser","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486040", "title" : "Saint Bonafice ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486042", "title" : "Saskatoon-Rosetown-Biggar ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486044", "title" : "Winnipeg South ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486046", "title" : "Winnipeg South Centre","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486048", "title" : "Nunavut","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486051", "title" : "Fredericton ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486053", "title" : "Madawaska-Restigouche ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486055", "title" : "Random-Burin-St. George%u2019s ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486057", "title" : "Saint John ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486059", "title" : "South Shore-St. Margaret%u2019s ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486061", "title" : "St. John%u2019s East ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486063", "title" : "St. John%u2019s South-Mount Pearl ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486065", "title" : "Tobique-Mactaquac ","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2486067", "title" : "West Nova","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "2533112", "title" : "Saanich and the Islands","points" : "0", "description" : "Well known enviromentelist Briony Penn has a chance for the liberals in this riding. I am happy to vote for her if my Green vote can go to Central Van...","link" : "","thumbnail" : ""},{"id" : "2533113", "title" : "","points" : "0", "description" : "","link" : "","thumbnail" : ""},{"id" : "33911971", "title" : "Totally Ultimate","points" : "0", "description" : "<a href="http://totallyultimate.com">Ultimate Store: Ultimate Jerseys</a>","link" : "","thumbnail" : ""}], "display_mode" : "normal" } ); openPlexo = function(options) { if (options == undefined) { options = {}; } var length; var plex = 0; if (plexData.length == 1) { plex = plexData[0]; } else if (options.plex_id > 0 ) { for (i = 0; i < plexData.length; i++) { if (plexData[i].id == options.plex_id) { plex = plexData[i]; } } } if (plex == 0) { // No plex specified alert("no plex"); return false; } if (options.num_results != undefined) { if (options.num_results == "All") { length = plex.items.length; } else if (options.num_results > 0) { length = options.num_results; } } else if (plex.num_results == "All") { length = plex.items.length; } else if (plex.num_results == "") { length = 5; } else { length = plex.num_results; } if (length > plex.items.length) { length = plex.items.length; } else if (length == 0) alert(plex.num_results); if (options.container != undefined) { var el = document.getElementById(options.container); } else { var el = document.getElementById("plex"); if (el == undefined) { alert("no container"); return false; } } /* .flickr_plexo-item { } .plexo_rank-flickr { } .plexo_rank-flickr h4 { } .plexo_rank-flickr sup { } .points-flickr { color:#666666;font-family:verdana,Arial,Helvetica,sans-serif;font-size:9px;font-size-adjust:none;font-stretch:normal;font-style:italic;font-variant:normal;font-weight:normal;line-height:normal;padding:0pt; } */ var out = ""; if (options.size != "sidebar") { // Insert header for the regular sized widget. out += '\n
'; out += '\n

' + plex.title + '

'; out += '\n

' + plex.subtitle + '

'; out += '\n

' + plex.description + '

'; } else { //Insert header for sidebar widget. out += '
'; out += '\n

' + plex.title + '

'; out += '\n

' + plex.subtitle + '

'; out += '\n

' + plex.description + '

'; } if (plex.type == "Flickr") { for (i = 0; i < length; i++) { var points; var item = plex.items[i]; if (item.points == 1) points = item.points + " point"; else points = item.points + " points"; out += '\n
'; out += '\n '; out += '\n '; out += '\n '; out += '\n
'; out += '\n
'; out += '\n

# ' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n ' + points + ' '; out += '\n
'; out += '\n
'; out += '\n
'; } out += '\n
'; } else if (plex.type == "YouTube") { for (i = 0; i < length; i++) { var points; var item = plex.items[i]; if (item.points == 1) points = item.points + " point"; else points = item.points + " points"; if (plex.display_mode == "full" && options.size != "sidebar") { var youtube_id = item.link.split("=")[1]; out += '\n
'; out += '\n
'; out += '\n

# ' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n
'; out += '\n
'; out += '\n

' + item.title + ' ' + points + '

'; out += '\n '; out += '\n '; out += '\n '; out += '\n
'; out += '\n
'; /* out += '\n
'; out += '\n
'; out += '\n

# ' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n ' + item.title + ' '; out += '\n ' + points + ' '; out += '\n
'; out += '\n
'; //out += '\n
'; */ out += '\n
'; } else { out += '\n
'; out += '\n '; out += '\n '; out += '\n '; out += '\n
'; out += '\n
'; out += '\n

# ' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n ' + points + ' '; out += '\n
'; out += '\n
'; out += '\n
'; } } out += '\n
'; } else { for (i = 0; i < length; i++) { var points; var item = plex.items[i]; if (item.points == 1) points = item.points + " point"; else points = item.points + " points"; out += '\n
'; out += '\n
'; out += '\n

#' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n
'; out += '\n
'; if (options.size != "sidebar" && item.thumbnail != "" && (plex.thumbnails != "no" || options.thumbnails == "yes") && options.thumbnails != "no") { if (item.link != "") out += '\n '; out += '\n '; if (item.link != "") out += '\n '; } out += '\n

'; if (item.link != "") out += '\n '; out += item.title; if (item.link != "") out += '\n '; out += '

'; if (options.size != "sidebar") { out += '\n

' + item.description + ' ' + points + '

'; } out += '\n
'; out += '\n
'; out += '\n
'; } } if (options.size != "sidebar") { // Insert footer for the regular sized widget. if (plex.items.length == length) out += '
See the original lens
\n
\n'; else out += '
See all ' + plex.items.length + ' and vote
\n
\n'; out += '\n
'; out += '\n
created by ' + plex.lensmaster + '
'; out += '\n
'; out += '\n
'; out += '\n
'; out += '\n
'; } else { //Insert footer for sidebar widget. if (plex.items.length == length) out += '
See the original lens
\n
\n'; else out += '
See all ' + plex.items.length + ' and vote
\n
\n'; out += '\n
'; out += '\n
created by
'; out += '\n ' + plex.lensmaster + '
'; out += '\n
'; out += '\n
'; out += '\n
'; out += ''; } /* } else { } } else { if (options.size != "sidebar") { var out = ""; out += '\n
'; out += '\n

' + plex.title + '

'; out += '\n

' + plex.subtitle + '

'; out += '\n

' + plex.description + '

'; /*
Vote for more!
} else { var out = ""; for (i = 0; i < length; i++) { var points, item = plex.items[i]; if (item.points == 1) points = item.points + " point"; else points = item.points + " points"; out += '\n
'; out += '\n
'; out += '\n

#' + (i+1) + '

'; out += '\n
Vote Up
'; out += '\n
Vote Down
'; out += '\n
'; out += '\n
'; out += '\n

'; if (item.link != "") out += '\n '; out += item.title; if (item.link != "") out += '\n '; out += '

'; out += '\n

' + points + '

'; out += '\n
'; out += '\n
'; //out += '\n
'; } } } */ el.innerHTML = out; return true; }