/*********************************************
 * Special Order bvba
 * (c) Ken Pimontel, ken at specialorder dot be
 * Purpose: Base JQ script settings
 *
 * NOTES
 * From base site 0003
 *
 * DEPENDENCIES
 *
 * TODO
 *
 * HISTORY
 * Last change <!-- hhmts start -->2012-01-20 20:33:37<!-- hhmts end -->
 * 090331 ADDED Topmenu li:not(.active)
 * 090331 UPDATE SideMenu-T2 afgewerkt
 * 090327 ADDED auto form label width
 * 090327 ADDED a.box
 * 090120 First version
 *********************************************/

// Banccontact
$(document).ready(function(){
	$("div#banccontact").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads
	$("div#banccontact").hover(function(){
		$(this).fadeTo("fast", 1.0); // This should set the opacity to 100% on hover
		},function(){
		$(this).fadeTo("fast", 0.6); // This should set the opacity back to 60% on mouseout
	});
});


// TopMenu-img
$(document).ready(function(){
	$("#TopMenu li:not(.active) img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads
	$("#TopMenu li:not(.active) img").hover(function(){
		$(this).fadeTo("fast", 1.0); // This should set the opacity to 100% on hover
		},function(){
		$(this).fadeTo("fast", 0.6); // This should set the opacity back to 60% on mouseout
	});
});


// SideMenu-T2
$(document).ready(function(){
	$('#SideMenu-T2 ul').slideUp(700);
//	$('#SideMenu-T2 ul').hide();
	$('#SideMenu-T2 ul.actief').show();
	$('#SideMenu-T2 li a').click(function() {
			$('#SideMenu-T2 ul.open').slideUp(700).removeClass("open");
			$(this).next().hide().slideDown(700).addClass("open");
			return false;
		}
	);
});


$(document).ready(function(){
    $('div.box').corner("8px");
    $('div.boxright').corner("tr br 10px");
    $('div.boxtop').corner("top 10px");
    $('div.boxbottom').corner("bottom 10px");
});


jQuery.fn.fancybox.defaults.path = 'http://nethome.be/_js/fancybox-1.2.1/';
$(document).ready(function() {
	 $("a.box").fancybox({
	 	'hideOnContentClick': true,
	 	'zoomSpeedIn': 500,
	 	'zoomSpeedOut': 500,
	 	'frameWidth': 500,
	 	'frameHeight': 600,
	 	'overlayShow': true,
	 	'overlayOpacity': 0.75
	 	});

 });

$(document).ready(function(){
    $("a[href$=pdf]")
        .addClass("pdf")
        .attr({ target: "_blank" });
    $("a[href$=zip]").addClass("zip");
    $("a[href$=psd]").addClass("psd");
    $("a[href*=mailto]").addClass("mailto");
});


// Automatically sets a form's label width correctly

$(document).ready(function() {
    var max = 0;
    $("form.autowidth label").each(function(){
        if ($(this).width() > max)
            max = $(this).width();
    });
    $("form.autowidth label").width(max);
});

