// Company: nPost.com // Copyright: Copyright (c) 2009 // Version: 3.0, Created on June 15, 2009 var nJobs = function() { var jobs = [{ 'id': '1457', 'title': 'Omnistar Affiliate Softwa...', 'company': 'JACKSON' },{ 'id': '1456', 'title': 'Customer Support for Fast...', 'company': 'HasOffers' },{ 'id': '1455', 'title': 'C Programmer', 'company': 'HasOffers' },{ 'id': '1454', 'title': 'PHP Developer', 'company': 'HasOffers' },{ 'id': '1453', 'title': 'Marketing/PR - San Franci...', 'company': 'metaio' },{ 'id': '1452', 'title': 'Front End Developer for G...', 'company': 'Spiral Genetics, Inc.' },{ 'id': '1451', 'title': 'Manager - Business Develo...', 'company': 'MPower Recruiting' },{ 'id': '1450', 'title': 'Software and Firmware Dev...', 'company': 'Telematics Innovations' },{ 'id': '1449', 'title': 'Director of Business Deve...', 'company': 'Marketfish' },{ 'id': '1448', 'title': 'Inside Sales Manager', 'company': 'DataSphere Technologies' },{ 'id': '1447', 'title': 'Account Executive (Inside...', 'company': 'DataSphere Technologies' },{ 'id': '1446', 'title': '.NET Developer for Award-...', 'company': 'TisBest' },{ 'id': '1445', 'title': 'Marketing & Sales - S...', 'company': 'metaio' },{ 'id': '1443', 'title': 'Software Development - Sa...', 'company': 'metaio' },{ 'id': '1442', 'title': 'Looking for the long-time...', 'company': 'Conkurent LLC' },{ 'id': '1441', 'title': 'VP Engineering (Get equit...', 'company': 'ANNOtype Inc.' },{ 'id': '1439', 'title': 'Enterprise Software Consu...', 'company': 'Idea Entity' },{ 'id': '1438', 'title': 'Accounting Manager', 'company': 'SocialBon' },{ 'id': '1437', 'title': 'Ruby On Rails and C++ Dev...', 'company': 'PhotoRocket' },{ 'id': '1436', 'title': 'Senior Systems Administra...', 'company': 'Blue Box Group, LLC' },{ 'id': '1435', 'title': 'Software developer', 'company': 'simpson' },{ 'id': '1434', 'title': 'Lead Backend J2EE Develop...', 'company': 'Introspectr' },{ 'id': '1433', 'title': 'Looking for Developer Par...', 'company': 'Igniite' },{ 'id': '1432', 'title': 'Freelance Web App UI desi...', 'company': 'Kerika' },{ 'id': '1431', 'title': 'Ruby on Rails Developer', 'company': 'PhotoRocket' },{ 'id': '1430', 'title': 'Outlook Developer', 'company': 'PhotoRocket' },{ 'id': '1429', 'title': 'Senior Software Developer...', 'company': 'Bobber Interactive' },{ 'id': '1428', 'title': 'Sr. Designer', 'company': 'MPower Recruiting' },{ 'id': '1427', 'title': 'Java developers with Linu...', 'company': 'People TechGroup, Inc ' },{ 'id': '1425', 'title': 'Estately is Hiring a Ruby...', 'company': 'Estately' },{ 'id': '1423', 'title': 'Silverlight Developer wit...', 'company': 'Idea Entity' },{ 'id': '1422', 'title': 'Project Manager', 'company': 'Idea Entity' },{ 'id': '1421', 'title': 'Software Development Engi...', 'company': 'TravelPost' },{ 'id': '1420', 'title': 'UX Designer', 'company': 'MPower Recruiting' },{ 'id': '1419', 'title': 'Sr Developer', 'company': 'Artech Information System...' }]; return { isReady: false, page: 1, render: function() { this.isReady = true; var insertText = this.header(); insertText += this.body(); insertText += this.footer(); document.getElementById("npost_jobs_widget_id_pyFRjry9S8d57opU").innerHTML = insertText; }, header: function() { var jobHeader = "
"; jobHeader += "
\"logo\"nPost Startup Jobs
" jobHeader += "
"; return jobHeader; }, body: function() { var jobListing = "
"; for (var i = 0; i < jobs.length; i++) { jobListing += "
" + jobs[i].title + "
" + jobs[i].company + "
"; } jobListing += "
"; return jobListing; }, footer: function() { var jobFooter = "
Page: "; for (var i = 1; i < 6; i++) { jobFooter += "" + i + ""; } jobFooter += "
"; return jobFooter; }, setState: function(el, focus) { if (focus) { if (el.value == "Find a job...") { el.value = ""; } } else { if (el.value == "") { el.value = "Find a job..."; } } }, pagerHover: function(el, hover) { if (hover) { el.style.textDecoration = "underline"; } else { el.style.textDecoration = "none"; } }, hover: function(el, hover) { if (hover) { el.childNodes[0].style.color = "#000"; el.childNodes[1].style.color = "#000"; } else { el.childNodes[0].style.color = "#1d234b"; el.childNodes[1].style.color = "#1d234b"; } }, search: function(ev) { if (ev.keyCode == 13) { document.location.href = "http://www.npost.com/jobs/search/?keywords=" + encodeURIComponent(document.getElementById("npost_jobs_widget_search").value); } }, paginate: function(page) { document.getElementById("npost_jobs_widget_listing").style.top = "-" + (144 * (page - 1)) + "px"; document.getElementById("npost_jobs_widget_listing_page_" + this.page).style.fontWeight = "normal"; document.getElementById("npost_jobs_widget_listing_page_" + page).style.fontWeight = "bold"; this.page = page; }, loadUrl: function(id) { document.location.href = "http://www.npost.com/jobs/job/" + id; } }; }(); /*! * * BELOW IS A MODIFIED VERSION OF A FUNCTION FROM JQUERY * * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ var nPostBindReady = function (){ // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", function(){ document.removeEventListener( "DOMContentLoaded", arguments.callee, false ); nJobs.render(); }, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent("onreadystatechange", function(){ if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", arguments.callee ); nJobs.render(); } }); // If IE and not an iframe // continually check to see if the document is ready if ( document.documentElement.doScroll && window == window.top ) (function(){ if ( nJobs.isReady ) return; try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch( error ) { setTimeout( arguments.callee, 0 ); return; } // and execute any waiting functions nJobs.render(); })(); } // A fallback to window.onload, that will always work window.onload = function() { nJobs.render(); }; }();