var mycarousel_itemList = [
{url: '/wp-content/uploads/2011/10/buchalter-nemer.jpg', title: 'img26'},
{url: '/wp-content/uploads/2011/10/alston-bird.jpg', title: 'img25'},
{url: '/wp-content/uploads/2011/10/duane-morris.jpg', title: 'img24'},
{url: '/wp-content/uploads/2011/10/fried-frank.jpg', title: 'img23'},
{url: '/wp-content/uploads/2011/10/holman-fenwick-willan.jpg', title: 'img22'},
{url: '/wp-content/uploads/2011/10/macfarlanes.jpg', title: 'img21'},
{url: '/wp-content/uploads/2011/10/proskauer.jpg', title: 'img21'},
{url: '/wp-content/uploads/2011/10/nelson-mullins.jpg', title: 'img20'},
{url: '/wp-content/uploads/2011/10/ropes-gray.jpg', title: 'img19'},
{url: '/wp-content/uploads/2011/10/shook-hardy-bacon.jpg', title: 'img18'},
{url: '/wp-content/uploads/2011/10/stites-harbison.jpg', title: 'img17'},

	{url: '/wp-content/uploads/2011/07/olswang.jpg', title: 'img16'}, 
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-15.gif', title: 'img15'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-14.gif', title: 'img14'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-12.gif', title: 'img13'},
    {url: '/wp-content/themes/frayman-2.0/images/logos/logos-1.gif', title: 'img12'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-2.gif', title: 'img11'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-3.gif', title: 'img10'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-4.gif', title: 'img9'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-5.gif', title: 'img8'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-7.gif', title: 'img7'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-8.gif', title: 'img6'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-9.gif', title: 'img5'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-10.gif', title: 'img4'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-11.gif', title: 'img3'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-12.gif', title: 'img2'},
	{url: '/wp-content/themes/frayman-2.0/images/logos/logos-13.gif', title: 'img1'}
	

];

function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
    // The index() method calculates the index from a
    // given index who is out of the actual item range.
    var idx = carousel.index(i, mycarousel_itemList.length);
    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
    carousel.remove(i);
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    return '<img src="' + item.url + '" width="225" height="75" alt="' + item.title + '" />';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
		auto: '2',
        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}
    });


	
	// slider for banner
	/*function mycarousel_initCallback(carousel)
	{
	    // Disable autoscrolling if the user clicks the prev or next button.
	    carousel.buttonNext.bind('click', function() {
	        carousel.startAuto(0);
	    });

	    carousel.buttonPrev.bind('click', function() {
	        carousel.startAuto(0);
	    });

	    // Pause autoscrolling if the user moves with the cursor over the clip.
	    carousel.clip.hover(function() {
	        carousel.stopAuto();
	    }, function() {
	        carousel.startAuto();
	    });
	};

	jQuery(document).ready(function() {
	    jQuery('#banner ul').jcarousel({
	        auto: 5,
	        wrap: 'circular',
	        initCallback: mycarousel_initCallback,
			animation: 'fast',
			
	    });
	});*/
	
	//slides for banner
	jQuery('#banner ul').before('<div id="cycle-nav">').cycle({
		timeout:  12000, 
		speed:   600,
		pager:  '#cycle-nav' 
	});
	
	$('a.media').media( { width: 300, height: 30 } );
	
	//$('#banner .gutter').html('');
	//$('#banner .gutter').cycle()
	
	/*if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) { 
		
		jQuery('.home #banner .gutter').css('height','206px');
	   	jQuery('.home #banner .gutter').html('<img src="/wp-content/themes/frayman-2.0/images/slideshow-1.jpg" width="940" height="206" /><img src="/wp-content/themes/frayman-2.0/images/slideshow-2.jpg" width="940" height="206" /><img src="/wp-content/themes/frayman-2.0/images/slideshow-3.jpg" width="940" height="206" /><img src="/wp-content/themes/frayman-2.0/images/slideshow-4.jpg" width="940" height="206" /><img src="/wp-content/themes/frayman-2.0/images/slideshow-5.jpg" width="940" height="206" />');
		jQuery('.home #banner .gutter').cycle();
	
	}*/
});


    











