$(document).ready(
	function() {
	    var $container = $(".container");
	    $container.wtRotator({
	        width: 980,
	        height: 360,
	        button_width: 8,
	        button_height: 8,
	        button_margin: 5,
	        auto_start: true,
	        delay: 5000,
	        transition: "fade",
	        transition_speed: 800,
	        block_size: 75,
	        vert_size: 55,
	        horz_size: 50,
	        cpanel_align: "TR",
	        timer_align: "bottom",
	        display_thumbs: true,
	        display_dbuttons: true,
	        display_playbutton: true,
	        tooltip_type: "none",
	        display_numbers: false,
	        display_timer: false,
	        mouseover_pause: false,
	        cpanel_mouseover: false,
	        text_mouseover: false,
	        text_effect: "fade",
	        text_sync: true,
	        shuffle: true,
	        block_delay: 25,
	        vstripe_delay: 73,
	        hstripe_delay: 183
	    });

	    var $trans = $("#transitions");
	    var $textEffects = $("#texteffects");
	    var $cpAlign = $("#cpalignments");
	    var $cpPos = $("input[name='cp-pos']");
	    var $cpanelCB = $("#cpanel-cb");
	    var $ttType = $("#tt-type");
	    var $thumbCB = $("#thumbs-cb");
	    var $dBtnsCB = $("#dbuttons-cb");
	    var $playBtnCB = $("#playbutton-cb");
	    var $timerCB = $("#timer-cb");
	    var $pauseCB = $("#pause-cb");
	    var $textCB = $("#text-cb");

	    $trans.val("random").change(
			function() {
			    $container.setTransition($(this).val());
			}
		);

	    $textEffects.val("fade").change(
			function() {
			    $container.setTextEffect($(this).val());
			}
		);

	    $cpAlign.val("BR").change(
			function() {
			    $container.setCpanelAlign($(this).val());
			}
		);

	    $("input#pos-inside").attr("checked", true);
	    $cpPos.change(
			function() {
			    var val = $(this).filter(":checked").val();
			    $container.setCpanelPos(val);
			    $cpanelCB.attr("disabled", val == "outside");
			}
		);

	    $ttType.val("image").change(
			function() {
			    $container.setTooltipType($(this).val());
			}
		);

	    $thumbCB.attr("checked", "checked").change(
			function() {
			    var val = $(this).attr("checked");
			    $container.setThumbs(val);
			    $ttType.attr("disabled", !val);
			    checkCPanel();
			}
		);

	    $dBtnsCB.attr("checked", "checked").change(
			function() {
			    $container.setDButtons($(this).attr("checked"));
			    checkCPanel();
			}
		);

	    $playBtnCB.attr("checked", "checked").change(
			function() {
			    $container.setPlayButton($(this).attr("checked"));
			    checkCPanel();
			}
		);

	    $timerCB.attr("checked", "checked").change(
			function() {
			    $container.setTimerBar($(this).attr("checked"));
			}
		);

	    $pauseCB.attr("checked", "").change(
			function() {
			    $container.setMouseoverPause($(this).attr("checked"));
			}
		);

	    $textCB.attr("checked", "").change(
			function() {
			    $container.setMouseoverText($(this).attr("checked"));
			}
		);

	    $cpanelCB.attr("checked", "").change(
			function() {
			    $container.setMouseoverCPanel($(this).attr("checked"));
			}
		);

	    var checkCPanel = function() {
	        var val = ($thumbCB.attr("checked") || $dBtnsCB.attr("checked") || $playBtnCB.attr("checked"));
	        $cpanelCB.attr("disabled", !val || $cpPos.filter(":checked").val() == "outside");
	        $cpPos.attr("disabled", !val);
	        $cpAlign.attr("disabled", !val);
	    }
	}
);




////$(document).ready(
////	function() {
////	    var $container = $(".container");
////	    $container.wtRotator({
////	        width: 855,
////	        height: 300,
////	        button_width: 15,
////	        button_height: 15,
////	        button_margin: 5,
////	        auto_start: true,
////	        delay: 5000,
////	        transition: "fade",
////	        transition_speed: 800,
////	        block_size: 75,
////	        vert_size: 55,
////	        horz_size: 50,
////	        cpanel_align: "TR",
////	        timer_align: "bottom",
////	        display_thumbs: true,
////	        display_dbuttons: true,
////	        display_playbutton: true,
////	        tooltip_type: "none",
////	        display_numbers: false,
////	        display_timer: false,
////	        mouseover_pause: false,
////	        cpanel_mouseover: false,
////	        text_mouseover: false,
////	        text_effect: "fade",
////	        text_sync: true,
////	        shuffle: true,
////	        block_delay: 25,
////	        vstripe_delay: 73,
////	        hstripe_delay: 183
////	    });

////	    var $trans = $("#transitions");
////	    var $textEffects = $("#texteffects");
////	    var $cpAlign = $("#cpalignments");
////	    var $cpPos = $("input[name='cp-pos']");
////	    var $cpanelCB = $("#cpanel-cb");
////	    var $ttType = $("#tt-type");
////	    var $thumbCB = $("#thumbs-cb");
////	    var $dBtnsCB = $("#dbuttons-cb");
////	    var $playBtnCB = $("#playbutton-cb");
////	    var $timerCB = $("#timer-cb");
////	    var $pauseCB = $("#pause-cb");
////	    var $textCB = $("#text-cb");

////	    $trans.val("random").change(
////			function() {
////			    $container.setTransition($(this).val());
////			}
////		);

////	    $textEffects.val("fade").change(
////			function() {
////			    $container.setTextEffect($(this).val());
////			}
////		);

////	    $cpAlign.val("BR").change(
////			function() {
////			    $container.setCpanelAlign($(this).val());
////			}
////		);

////	    $("input#pos-inside").attr("checked", true);
////	    $cpPos.change(
////			function() {
////			    var val = $(this).filter(":checked").val();
////			    $container.setCpanelPos(val);
////			    $cpanelCB.attr("disabled", val == "outside");
////			}
////		);

////	    $ttType.val("image").change(
////			function() {
////			    $container.setTooltipType($(this).val());
////			}
////		);

////	    $thumbCB.attr("checked", "checked").change(
////			function() {
////			    var val = $(this).attr("checked");
////			    $container.setThumbs(val);
////			    $ttType.attr("disabled", !val);
////			    checkCPanel();
////			}
////		);

////	    $dBtnsCB.attr("checked", "checked").change(
////			function() {
////			    $container.setDButtons($(this).attr("checked"));
////			    checkCPanel();
////			}
////		);

////	    $playBtnCB.attr("checked", "checked").change(
////			function() {
////			    $container.setPlayButton($(this).attr("checked"));
////			    checkCPanel();
////			}
////		);

////	    $timerCB.attr("checked", "checked").change(
////			function() {
////			    $container.setTimerBar($(this).attr("checked"));
////			}
////		);

////	    $pauseCB.attr("checked", "").change(
////			function() {
////			    $container.setMouseoverPause($(this).attr("checked"));
////			}
////		);

////	    $textCB.attr("checked", "").change(
////			function() {
////			    $container.setMouseoverText($(this).attr("checked"));
////			}
////		);

////	    $cpanelCB.attr("checked", "").change(
////			function() {
////			    $container.setMouseoverCPanel($(this).attr("checked"));
////			}
////		);

////	    var checkCPanel = function() {
////	        var val = ($thumbCB.attr("checked") || $dBtnsCB.attr("checked") || $playBtnCB.attr("checked"));
////	        $cpanelCB.attr("disabled", !val || $cpPos.filter(":checked").val() == "outside");
////	        $cpPos.attr("disabled", !val);
////	        $cpAlign.attr("disabled", !val);
////	    }
////	}
////);
