
var phJobs = {
		jobs: [],
        render: function(callback) {
          		if(!callback) {
            		callback = this.defaultRender;
				}

            	callback.apply(this, []);
         	}, 
		defaultRender: function() {
			document.write('<div class="phJobListing" id="phJobListing">');
  			var c = this.jobs.length;
  			if(c == 0) {
				document.write('<i>There are no openings at this time</i>');
  			}

  			document.write('<ul>');
  			for(var i=0; i<c; ++i) {


    			var j = this.jobs[i];
	
    			document.write('<li class="phJobListing"><span class="phJobListingName">'
                  + '<a class="phJobListingName" href="http://www.powerhires.com/apply/index.php?applicationID='
                  + j.applicationID
                  + '" target="_blank">' 
                  + j.name + "</a></span><br />" 
                  + j.desc
                  + '<br /><a class="phJobListing" href="http://www.powerhires.com/apply/index.php?applicationID='
                  + j.applicationID
                  + '" target="_blank">apply now &raquo;</a>');

  			}
  			document.write('</ul></div>');
 		}
	};
  phJobs.jobs.push({ name: 'LAMP Web Developer',
                desc: '<P>Experienced, motivated LAMP developer sought for small, high growth company.&nbsp;</P><br /><P>Must be able to</P><br /><UL><br /><LI>craft requirements from business logic and goals</LI><br /><LI>build excellent user interfaces</LI><br /><LI>build scalable web application&nbsp;</LI></UL><br /><P>&nbsp;Competitive compensation.<BR></P>',
                applicationID: 1});
  phJobs.jobs.push({ name: 'Test job',
                desc: 'test me!',
                applicationID: 50});

 phJobs.render();
