$.noConflict();
jQuery(document).ready(function($) {

    // Homepage Cycle
	$('#home-cycle').cycle({ 
    fx:     'fade', 
    speed:  1000,
    sync: 1, 
    timeout: 5000,
    next:   '#next', 
    prev:   '#prev'
    });
    
    // Gallery Cycle
	$('#gallery-cycle').cycle({ 
    fx:     'fade', 
    speed:  1000,
    sync: 1, 
    timeout: 0,
    next:   '#next-gallery', 
    prev:   '#prev-gallery',
    pager:  '#gallery-thumbs', 
    pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#gallery-thumbs li:eq(' + idx + ') a'; 
    }
    });
    
    $("a.opacity").mouseenter(function () {
		$("img", this).fadeTo(200, 0.7);
	});
	
	$("a.opacity").mouseleave(function () {
		$("img", this).fadeTo(150, 1);
	});
	
	$("#nav-below a").mouseenter(function () {
		$(this).fadeTo(200, 0.7);
	});
	
	$("#nav-below a").mouseleave(function () {
		$(this).fadeTo(150, 1);
	});
	
	$("input#gform_submit_button_1").mouseenter(function () {
		$(this).fadeTo(200, 0.7);
	});
	
	$("input#gform_submit_button_1").mouseleave(function () {
		$(this).fadeTo(150, 1);
	});
	
	$("a.show-thumbs").click( function () { $('.gallery-thumbs-container').fadeToggle(400); });
    
    $("ul#gallery-thumbs li a").click( function () { $('.gallery-thumbs-container').fadeToggle(400); });
    
    $(".comments").fadeIn(500);
    
    $('#gallery-cycle').waitForImages(function() {
    	$('a.show-thumbs').fadeToggle(500);
    	$('#next-gallery').fadeToggle(500);
    	$('#prev-gallery').fadeToggle(500);
	});
	
	//$(document).bind("contextmenu",function(e){
    //	return false;
    //});

    
});
