$(document).ready(function(){
				/*$("a[rel='shadowbox']").colorbox();*/
				$("a[rel='shadowbox']").colorbox({transition:"fade"});
				/*$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
				$("a[rel='example4']").colorbox({slideshow:true});*/

});


/**
 * jQuery.labelify - Display in-textbox hints
 * Stuart Langridge, http://www.kryogenix.org/
 * Released into the public domain
 * @author Stuart Langridge
 * @version 1.3
 */
jQuery.fn.labelify = function(settings) {
  settings = jQuery.extend({
    text: "title",
    labelledClass: ""
  }, settings);
  var lookups = {
    title: function(input) {
      return $(input).attr("title");
    },
    label: function(input) {
      return $("label[for=" + input.id +"]").text();
    }
  };
  var lookup;
  var jQuery_labellified_elements = $(this);
  return $(this).each(function() {
    if (typeof settings.text === "string") {
      lookup = lookups[settings.text]; // what if not there?
    } else {
      lookup = settings.text; // what if not a fn?
    };
    // bail if lookup isn't a function or if it returns undefined
    if (typeof lookup !== "function") { return; }
    var lookupval = lookup(this);
    if (!lookupval) { return; }

    // need to strip newlines because the browser strips them
    // if you set textbox.value to a string containing them    
    $(this).data("label",lookup(this).replace(/\n/g,''));
    $(this).focus(function() {
      if (this.value === $(this).data("label")) {
        this.value = this.defaultValue;
        $(this).removeClass(settings.labelledClass);
      }
    }).blur(function(){
      if (this.value === this.defaultValue) {
        this.value = $(this).data("label");
        $(this).addClass(settings.labelledClass);
      }
    });
    
    var removeValuesOnExit = function() {
      jQuery_labellified_elements.each(function(){
        if (this.value === $(this).data("label")) {
          this.value = this.defaultValue;
          $(this).removeClass(settings.labelledClass);
        }
      })
    };
    
    $(this).parents("form").submit(removeValuesOnExit);
    $(window).unload(removeValuesOnExit);
    
    if (this.value !== this.defaultValue) {
      // user already started typing; don't overwrite their work!
      return;
    }
    // actually set the value
    this.value = $(this).data("label");
    $(this).addClass(settings.labelledClass);

  });
};



$(document).ready(function() {

  // Remove the border from the last child of the ul's in the font size
  $('ul.text-resize li:last-child').css('border-right', 'none');
  // Remove the border from the last child of the ul's in the main nav
  $('ul.dropdown li:last-child').css('border-right', 'none');
    // Remove the border from the last child of the ul's in the agenda list
  $('#agenda ul li:last-child').css('border-bottom', 'none');
  $('.leftnav ul li:last-child').css('border-bottom', '1px solid #e8e8e8');
  $('.leftnav ul ul li:last-child').css('border-bottom', 'none');
  $('ul.dropdown ul li:last-child a').css('border-bottom', 'none');
  $('#content ul.list_standard li:last-child a').css('border-bottom', '1px solid #e8e8e8');
  
  
// Remove default view of the labels and place the text in the input field (plugin labelify used)
	$("#search-global label").hide();
	$("#search-global input").labelify({
		text: "label",
		labelledClass: "label-inside"
	});
	
	$("#mod-search-buurt label").hide();
	$("#mod-search-buurt input").labelify({
		text: "label",
		labelledClass: "label-inside"
	});
	
	$("#mod-newsletter label").hide();
	$("#mod-newsletter input").labelify({
		text: "label",
		labelledClass: "label-inside"
	});

   // Make the boxes with class "module" rounded
  // If statement necessary to be compatible with colorbox in IE
  if ($('.rounded').hasClass('transparent') == false){
    $('.rounded').addClass('transparent').wrapInner('<div class="box-middle"><div class="inner"></div></div>').prepend('<div class="box-top"></div>').append('<div class="box-bottom"></div>');
  }


  // Hide submit value attribute from display
  //$("input[type=submit]").attr("value", "");


  
	// Reset Font Size
  var originalFontSize = $('body').css('font-size');
    $(".text-resize-1").click(function(){
    $('body').css('font-size', originalFontSize);
  });
  
  // Increase Font Size to 13px
  $(".text-resize-2").click(function(){
    var currentFontSize = $('body').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = '13px';
    $('body').css('font-size', newFontSize);
    return false;
  });
  
  // Decrease Font Size to 14px
  $(".text-resize-3").click(function(){
    var currentFontSize = $('body').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = '14px';
    $('body').css('font-size', newFontSize);
    return false;
  });

});


