$(document).ready(function(){

$("ul#menu-main-navigation li.parent > a").removeAttr("href");

$("ul#menu-main-navigation li.parent").hover(function(){
    $(this).find("ul.sub-menu").animate({opacity: 'show'}, "fast");
},
function(){
    $(this).find("ul.sub-menu").animate({opacity: 'hide'}, "fast");
});


$("ul#menu-secondary-navigation li a").hover(function(){
    $(this).animate({paddingLeft: '95px'}, "fast");
},
function(){
    $(this).animate({paddingLeft: '90px'}, "fast");
});

$("div.widget.list ul li").hover(function(){
    $(this).animate({paddingLeft: '5px'}, "fast");
},
function(){
    $(this).animate({paddingLeft: '0px'}, "fast");
});

$("ul#menu-social-navigation li a").hover(function(){
    $(this).animate({top: "-3px"}, "fast");
},
function(){
    $(this).animate({top: "0px"}, "fast");
});

$('ul.home-rotator').after('<div id="rotator-nav">').cycle({
		fx: 'fade',
		pager:  '#rotator-nav', 
		speed: 1000,
		timeout: 10000,
		cleartypeNoBg: true		
	});
	
$('ul.testimonials').cycle({
		fx: 'scrollHorz',
		
		speed: 300,
		timeout: 10000,
		cleartypeNoBg: true		
	});
	
function activatePlaceholders() {
var detect = navigator.userAgent.toLowerCase();
if (detect.indexOf("safari") > 0) return false;
var inputs = document.getElementsByTagName("input");
for (var i=0;i<inputs.length;i++) {
  if (inputs[i].getAttribute("type") == "text") {
   if (inputs[i].getAttribute("placeholder") && inputs[i].getAttribute("placeholder").length > 0) {
    inputs[i].value = inputs[i].getAttribute("placeholder");
    inputs[i].onclick = function() {
     if (this.value == this.getAttribute("placeholder")) {
      this.value = "";
     }
     return false;
    }
    inputs[i].onblur = function() {
     if (this.value.length < 1) {
      this.value = this.getAttribute("placeholder");
     }
    }
   }
  }
}
}
window.onload=function() {
activatePlaceholders();
}

});


