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

	$('ul.superfish').superfish({ 
		delay: 600, // delay on mouseout
		animation: {opacity:'toggle', height:'show'}, // fade-in and slide-down animation
		speed: 350, // faster animation speed
		autoArrows:false
	}); 

// scrollable
	$("#flowpanes").scrollable({size: 1, circular: true }).autoscroll(6000).navigator({ 
        // select #flowtabs to be used as navigator 
        navi: "#flowtabs", 
 
        // select A tags inside the navigator to work as items (not direct children) 
        naviItem: 'a', 
 
        // assign "current" class name for the active A tag inside navigator 
        activeClass: 'current', 
		
		interval: 5000
    }); 		


// PrettyPhoto Settings 
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 1.00, /* Value betwee 0 and 1 */
		showTitle: false, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */
		overlay_gallery: false,
		callback: function(){}
	});


// Icons

$(function() {
$("span:contains('acrobat')").attr("class", "acrobat-icon");
$("span:contains('aftereffects')").attr("class", "aftereffects-icon");
$("span:contains('coda')").attr("class", "coda-icon");
$("span:contains('color')").attr("class", "color-icon");
$("span:contains('dreamweaver')").attr("class", "dreamweaver-icon");
$("span:contains('encore')").attr("class", "encore-icon");
$("span:contains('finalcut')").attr("class", "finalcut-icon");
$("span:contains('fireworks')").attr("class", "fireworks-icon");
$("span:contains('flash')").attr("class", "flash-icon");
$("span:contains('illustrator')").attr("class", "illustrator-icon");
$("span:contains('indesign')").attr("class", "indesign-icon");
$("span:contains('joomla')").attr("class", "joomla-icon");
$("span:contains('jquery')").attr("class", "jquery-icon");
$("span:contains('moo-tools')").attr("class", "moo-tools-icon");
$("span:contains('motion')").attr("class", "motion-icon");
$("span:contains('photoshop')").attr("class", "photoshop-icon");
$("span:contains('premier')").attr("class", "premier-icon");
$("span:contains('prototype')").attr("class", "prototype-icon");
$("span:contains('quark')").attr("class", "quark-icon");
$("span:contains('wordpress')").attr("class", "wp-icon");

 });

//tabs
$(function() {
$("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide'});
});



// fade

	$(".prev, .next").fadeTo("fast", 0.1);
	$(".prev, .next").hover(function(){
	$(this).stop().animate({opacity: 1}, 400 );
	},
	function () {
		$(this).stop().animate({opacity: .1}, 400); 
	});





	$(".gallery-img").hover(function(){
	$(this).stop().animate({opacity: 0.1}, 400 );
	},
	function () {
		$(this).stop().animate({opacity: 1}, 400); 
	});



/* The following code is executed once the DOM is loaded */
	
	$('.flipWrap').bind("click",function(){
		
		// $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):
		
		var elem = $(this);
		
		// data('flipped') is a flag we set when we flip the element:
		
		if(elem.data('flipped'))
		{
			// If the element has already been flipped, use the revertFlip method
			// defined by the plug-in to revert to the default state automatically:
			
			elem.revertFlip();
			
			// Unsetting the flag:
			elem.data('flipped',false)
		}
		else
		{
			// Using the flip method defined by the plugin:
			
			elem.flip({
				direction:'lr',
				speed: 350,
				onBefore: function(){
					// Insert the contents of the .sponsorData div (hidden from view with display:none)
					// into the clicked .sponsorFlip div before the flipping animation starts:
					
					elem.html(elem.siblings('.flipData').html());
				}
			});
			
			// Setting the flag:
			elem.data('flipped',true);
		}
	});	
	
	
// TABS
$(function() {
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul.tabs").tabs("div.panes > div");
});




  //SLIDER

//$("div.scrollable").scrollable({size: 1, vertical:false, clickable:false, onBeforeSeek: function() { this.getItems().fadeTo(200, 0.2);}, 
//         onSeek: function() { 
//            this.getItems().fadeTo(400, 1); 
//        } }).autoscroll(6000).navigator();

$("div.scrollable").scrollable({size: 1, circular: true }).autoscroll(6000).navigator();


// FADE-to Settings
	

	$(".rss").fadeTo("fast", 0.3);
	$(".rss").hover(function(){
	$(this).stop().animate({opacity: 1}, "fast" );
	},
	function () {
		$(this).stop().animate({opacity: .3}, "fast"); 
	});


	
	
<!-- tool tip  -->




$("#tooltip p").tooltip({ 
   	tip: '.direction-icons',
    opacity: 0.7, 
	effect: 'slide'
 
});





});


