jQuery(function($) {

/*
	$('#search-form input[type=text][value=]').val('SEARCH').attr('defaultValue', 'SEARCH').focus(function() {
		if ($(this).attr('defaultValue') == $(this).val()) { $(this).val('').css('letterSpacing','normal');}
	}).blur(function() {
		if ($(this).val() == '') { $(this).val($(this).attr('defaultValue')).attr('style','')}
	});
	*/
	
});


function handlejquery(){




    /*********************************************************
        Side Nav
    *********************************************************/
    /*jQuery('#foci-list').accordion({ 
        active: false, 
        header: '.head', 
        navigation: true, 
        event: 'mouseover', 
        selectedClass: 'selected-foci', 
        fillSpace: true
    });
    */

    /*********************************************************
        Tabs
    *********************************************************/
    $("#event-tabs").tabs("#event-panes > div", {
        effect: 'fade'
    }).history(); 
    

    var slideshowSpeed = 800;
    var slideshowTimeout = 4000;    

    /*********************************************************
       Item Page
    *********************************************************/    
    $('div#content-item-images').cycle({ 
        fx:      'fade', 
        speed:    slideshowSpeed, 
        timeout:  0,
        slideExpr: 'li',
        cleartype: '1',
        pager: '#item-thumbs',
        pagerAnchorBuilder: function(idx, slide) { 
            // return selector string for existing anchor 
            return '#item-thumbs li:eq(' + idx + ') a'; 
        } 
    });


    /*********************************************************
       Slideshow 
    *********************************************************/
    
    $('.gallery').cycle({ 
        fx:      'fade', 
        speed:    slideshowSpeed, 
        timeout:  0,
        continuous: 0, // set this to 0 so timeout will work
        slideExpr: 'li.gallery-item',
        cleartype: '1',
        next: '.slideshow-next',
        prev: '.slideshow-prev',
        pager: '#pane-target',
        pagerEvent: 'mouseover',

        pagerAnchorBuilder: function(idx, slide) { 
            // return selector string for existing anchor 
            return '#pane-target li:eq(' + idx + ') a'; 
        }
    });

    $('.gallery').cycle('pause');   
};


function close_item_cart_overlay(){
	var $ = jQuery;
    //$("#item-cart-overlay").css('display', 'none');
    $("#item-cart-overlay").slideUp('slow');
}
