jQuery(document).ready(function() {
    jQuery('#gallery').jcarousel({
        scroll: 1
    });
});


$(function() {
    $('#news-area').cycle({
        fx:     'fade',
        speed:  '1000',
        timeout: 20000,
        pager:  '#news-tabs',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#news-tabs div:eq(' + (idx) + ') a';
        }
    });
    
});

$(function() {
    $('#articles-area').cycle({
        fx:     'fade',
        speed:  '1000',
        timeout: 20000,
        pager:  '#articles-tabs',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#articles-tabs div:eq(' + (idx) + ') a';
        }
    });
    
});

$(function() {
    $('#daily-content').cycle({
        fx:     'fade',
        speed:  '3000',
        timeout: 0,
        pager:  '#daily-tabs',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#daily-tabs li:eq(' + (idx) + ') a';
        }
    });
    
});

//----Weather---->

$(document).ready(function(){

function get_weather()
{
var p = $("#code").val();

var u = ($('#u').attr('checked')) ? '&u=c' : '';
var to_load = '../../content/weather/get_weather.php?p='+ p + u;

$("#weather").html('<img style="margin:104px 0 0 80px;" src="../../content/weather/ajax-loader.gif" align="center">');

$("#weather").load(to_load);
}

$(window).load(get_weather); // Trigger "get_weather" when the window loads

// Trigger "get_weather" when the form objects are used
$("#code").change(get_weather);
$("#u").click(get_weather); 
});

//-->

$(document).ready(function(){
		$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
	});
