
$(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000});
});

function hasBorderRadius(){
  var element = document.documentElement;
  var style = element.style;
  if (style){
    return typeof style.borderRadius == "string" ||
      typeof style.MozBorderRadius == "string" ||
      typeof style.WebkitBorderRadius == "string" ||
      typeof style.KhtmlBorderRadius == "string";
  }
  return null;
}

(function($){  

  $.fn.formCorner = function(){   
    return this.each(function() {  
      var input = $(this);
      var input_background = input.css("background-color");
      var input_border = input.css("border-color");
      input.css("border", "none");
      var wrap_width = parseInt(input.css("width")) + 4;
      var wrapper = input.wrap("<div></div>").parent();
      var border = wrapper.wrap("<div></div>").parent();
      wrapper.css("background-color", input_background)
             .css("padding", "1px");
      border.css("background-color",input_border)
            .css("width", wrap_width + "px")
            .css('padding', '1px');
      wrapper.corner("round 5px");
      border.corner("round 5px");
    });  
  };  
})(jQuery); 

$(function(){
  if(!hasBorderRadius()){
    $("div#left-menu").corner("round 5px");
    $("div#instructions").corner("round 5px");
    $("h1").corner("round 5px");
    $("p.box-header").corner("round 5px");
    $("div#menu").corner("round 5px");
    $("div#headerpic").corner("round 5px");
    $("div#news").corner("round 5px");
    $("div#articles").corner("round 5px");
    $("div#copyrights").corner("round 5px");
  }
});

/*
 div#left-menu, div#instructions, h1, p.box-header, div#menu,
div#headerpic, div#news, div#articles, div#copyrights
*/


