/* to use popup windows add class="popup" to the anchor tag */
$(document).ready(function() {

	jQuery('a.popup').live('click', function(){
		//alert ("hello world");
		newwindow=window.open($(this).attr('href'),'','height=500,width=660');
			if (window.focus) {newwindow.focus()}
			return false;
	});
});


/* keep the design-bottom div stuck to the bottom of window */
$(document).ready(function() {
  positionFooter();
  
  $(window)
    .scroll(positionFooter)
    .resize(positionFooter);
  
  function positionFooter() {
    var docHeight = $(document.body).height() - $("#sticky-footer-push").height();
    if(docHeight < $(window).height()){
      var diff = $(window).height() - docHeight;
      if (!$("#sticky-footer-push").length > 0) {
        $("#footer").before('<div id="sticky-footer-push"></div>');
      }
      $("#sticky-footer-push").height(diff);
    }	
  }
});
