// JavaScript Document

	$(window).load(function(){
	
	if ( window.location.hash ) {
    var destination = $( window.location.hash ).offset().top;
    $('html:not(:animated),body:not(:animated)').scrollTop( destination );
  }

		
		$(window).resize(function(){
    $('#work').masonry({
        columnWidth: $('#work .box').outerWidth(true)
    });
});
	
  
  
   $('#work').masonry({ columnWidth: 302,
  						singleMode: false,
					   animate: false,
					   itemSelector: '.box:visible',
  // Additional selector to specify which elements inside
  // the wrapping element will be rearranged.
  // Required for Infinite Scroll with window resizing.

  						resizeable: true,
  // Binds a Masonry call to window resizes 
  // so layout appears fluid.
  // default: true

   					   
  						
   });
	 
	 
	 Highlight("#work .highlight");
	 
	 $(".coluna_1").columnize({width:200, columns: 2});
	 $(".coluna_2").columnize({width:150});

	 
   
   
   
   
});


	
	
 $(document).ready(function(){
	 
	 $('a[rel=lightbox]').lightBox();
	 
	 
	 $("div.playlist").scrollable({
		items:'div.clips',
		vertical:true,
		next:'a.down',
		prev:'a.up'
	});

	 
	 
	 flowplayer("player", "js/flowplayer/flowplayer-3.2.5.swf",  {
	clip: {
		
		// these two configuration variables does the trick
		autoPlay: false, 
		autoBuffering: true, // <- do not place a comma here  
		baseUrl: 'http://www.cmktonline.com/videos/'
	},


	
	
	plugins: {			// load one or more plugins
        controls: {			// load the controls plugin
            //url: 'flowplayer.controls-tube-3.1.0.swf',	// always: where to find the Flash object
            playlist: true,				// now the custom options of the Flash object
            backgroundColor: '#111111',
            tooltips: {				// this plugin object exposes a 'tooltips' object
                buttons: true,
                fullscreen: 'Tela Cheia'
            }
        }
    }
	
}).playlist("div.petrol", {loop:true});



	 
	 
	
	 
 });
 
 

