//DropDown Menu
ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

//Rollover Home Buttons
$(document).ready(function (){

	$("#myslide .cover .pmob").css({ opacity: 0.0 });
		
	$('#button-list li a').mouseover(function(){
		var integer = $(this).attr('rel');
		$('#myslide .cover').css({left:-1000*(parseInt(integer)-1)}).hide().fadeIn(0); /*----- Width of div mystuff (here 160) ------ */
		$("#myslide .cover .pmob").css({ opacity: 1.0 });
		$('#button-list li a').each(function(){
		$(this).removeClass('active');
			if($(this).hasClass('button'+integer)){
				$(this).addClass('active')}
		});
	});
	$('#button-list li a').mouseout(function(){
		var integer = $(this).attr('rel');
		$('#myslide .cover').css({left:1000*(parseInt(integer)-1)}).hide().fadeIn(0); /*----- Width of div mystuff (here 160) ------ */
		$("#myslide .cover .pmob").css({ opacity: 0.0 });
		$('#button-list li a').each(function(){
		$(this).removeClass('active');
			if($(this).hasClass('button'+integer)){
				$(this).addClass('active')}
		});
	});
});

//Hover Effect
$(document).ready(function() {
	$('.fadeThis').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});
});

//Opacity Hover Effect
jQuery(document).ready(function() {
	jQuery("#button-list").delegate("li", "mouseover mouseout", function(e) {
		if (e.type == 'mouseover') {
		jQuery("#button-list li").not(this).dequeue().animate({opacity: "0.3"}, 300);
    	} else {
		jQuery("#button-list li").not(this).dequeue().animate({opacity: "1"}, 300);
   		}
	});
});

//PNG Fix
$(document).ready(function(){ 
	$(document).pngFix(); 
});
