jQuery(document).ready(function($){
	 
	 	
	
	  $("#jquery_jplayer").jPlayer({
		ready: function () {
			/* $("#track-01").trigger("click"); */
			demoInstanceInfo(this.element, $("#player_status")); // This displays information about jPlayer's configuration in the demo page
			
		},
		customCssIds: true,	
		swfPath: "http://getinpr.com/js"
	})
		.jPlayer("cssId", "play", "play")
	.jPlayer("cssId", "pause", "pause")
	.jPlayer("cssId", "stop", "stop")
	.jPlayer("onProgressChange", function(lp,ppr,ppa,pt,tt) {
 		$("#pcent").text(parseInt(ppa)+"%");
	});


	$("#pause").hide();

	function showPauseBtn()
	{
		$("#play").fadeOut(function(){
			$("#pause").fadeIn();
		});
	}

	function showPlayBtn()
	{
		$("#pause").fadeOut(function(){
			$("#play").fadeIn();
		});
	}

	function playTrack(t,n)
	{
		$("#jquery_jplayer").jPlayer("setFile", t).jPlayer("play");

		showPauseBtn();

		$("#trackname").fadeOut(function(){
			$("#trackname").text(n);
			$("#trackname").fadeIn();
		});

		$("#pcent").fadeOut(function(){
			$("#pcent").fadeIn();
		});

		return false;
	}

 
	$("#track-01").click( changeTrack );
	$("#track-02").click( changeTrack );
	$("#track-03").click( changeTrack );
	$("#track-04").click( changeTrack );
	$("#track-05").click( changeTrack );
	$("#track-06").click( changeTrack );
	$("#track-07").click( changeTrack );
	$("#track-08").click( changeTrack );
	$("#track-09").click( changeTrack );
	$("#track-010").click( changeTrack );
	$("#track-011").click( changeTrack );
	$("#track-012").click( changeTrack );
	$("#track-013").click( changeTrack );
	$("#track-014").click( changeTrack );	
	$("#track-015").click( changeTrack );
	$("#track-016").click( changeTrack );
	$("#track-017").click( changeTrack );
	$("#track-018").click( changeTrack );
	$("#track-019").click( changeTrack );
	$("#track-020").click( changeTrack );
	$("#track-021").click( changeTrack );
	$("#track-022").click( changeTrack );
	$("#track-023").click( changeTrack );


	$("#track-20").click( changeTrack );
	$("#track-21").click( changeTrack );
	$("#track-22").click( changeTrack );
	$("#track-23").click( changeTrack );
	$("#track-24").click( changeTrack );
	$("#track-25").click( changeTrack );
	$("#track-26").click( changeTrack );
	$("#track-27").click( changeTrack );
	$("#track-28").click( changeTrack );
	$("#track-29").click( changeTrack );
	$("#track-30").click( changeTrack );
	$("#track-31").click( changeTrack );
	$("#track-32").click( changeTrack );
	$("#track-33").click( changeTrack );	
	$("#track-34").click( changeTrack );
	$("#track-35").click( changeTrack );
	$("#track-36").click( changeTrack );
	$("#track-37").click( changeTrack );
	$("#track-38").click( changeTrack );
	$("#track-39").click( changeTrack );
	$("#track-40").click( changeTrack );
	$("#track-41").click( changeTrack );
	$("#track-42").click( changeTrack );
	
	function changeTrack(e) {
		$("#trackname").text($(this).text());
		$("#jquery_jplayer").jPlayer("setFile", $(this).attr("rel")).jPlayer("play");
		$(this).blur();
		return false;
	}
 

	$("#vmax").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 100);
		$(this).blur();
		return false;
	});

	$("#vmute").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 0);
		$(this).blur();
		return false;
	});

	$("#vhalf").click(function() {
		$("#jquery_jplayer").jPlayer("volume", 50);
		$(this).blur();
		return false;
	});
 
	 
	 
	 
$('#g') 
   .click(function(){ 
       $(this) 
            .animate({backgroundPosition: '-80px 0px'}) 
            
              .animate({backgroundPosition: '-320px 0px'}) 
              
            .animate({backgroundPosition: '-240px 0px'}) 
          
            .animate({backgroundPosition: '-160px 0px'})
            .animate({backgroundPosition: '0px 0px'})
          
        ; 
   });	
	
	
/*div#g {background-position: 0px 0px;}	
div#e {background-position: -80px 0px;}	
div#t {background-position: -160px 0px; 	
div#in {background-position: -240px 0px; 	
div#n {background-position: -320px 0px;*/
	
 


 

  $(".widewrap").mouseout(function(){
 
	  
 
	  });  

 
$('.section').hide();

/*$('.mainnav a').click(function(){
	$('.section').show();
	});*/
	 
$('li.about a, a.about').click(function(){
	$('#about').show();
	});	
$('li.clients a, a.clients').click(function(){
	$('#about, #clients').show();
	});		
$('li.services a, a.services').click(function(){
	$('#about, #clients, #services').show();
	});			
$('a.contactus, a.contact').click(function(){
	$('#about, #clients, #services, #contact').show();
	});		 
	
	
	
	
	
	
(function(){
 
    var special = jQuery.event.special,
        uid1 = 'D' + (+new Date()),
        uid2 = 'D' + (+new Date() + 1);
 
    special.scrollstart = {
        setup: function() {
 
            var timer,
                handler =  function(evt) {
 
                    var _self = this,
                        _args = arguments;
 
                    if (timer) {
                        clearTimeout(timer);
                    } else {
                        evt.type = 'scrollstart';
                        jQuery.event.handle.apply(_self, _args);
                    }
 
                    timer = setTimeout( function(){
                        timer = null;
                    }, special.scrollstop.latency);
 
                };
 
            jQuery(this).bind('scroll', handler).data(uid1, handler);
 
        },
        teardown: function(){
            jQuery(this).unbind( 'scroll', jQuery(this).data(uid1) );
        }
    };
 
    special.scrollstop = {
        latency: 300,
        setup: function() {
 
            var timer,
                    handler = function(evt) {
 
                    var _self = this,
                        _args = arguments;
 
                    if (timer) {
                        clearTimeout(timer);
                    }
 
                    timer = setTimeout( function(){
 
                        timer = null;
                        evt.type = 'scrollstop';
                        jQuery.event.handle.apply(_self, _args);
 
                    }, special.scrollstop.latency);
 
                };
 
            jQuery(this).bind('scroll', handler).data(uid2, handler);
 
        },
        teardown: function() {
            jQuery(this).unbind( 'scroll', jQuery(this).data(uid2) );
        }
    };
 
})();	
	
	//SmoothScroll:	

    $('a[href*=#]').click(function() {
 
	 /*  $('#getin').css({'position': 'fixed'});  */

    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {        
            var $target = $(this.hash);            
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');            
            if ($target.length) {            
                var targetOffset = $target.offset().top;                
                $('html,body').animate({scrollTop: targetOffset}, 1000);
               
                                 
                return false;                
            }            
        }  
        
    });

  

    	   $(window).bind('scrollstart',function() {  
         $('.control').css({
	     
          'opacity': 0.4
          });	
});
$(window).bind('scrollstop',function() {  
         $('.control').animate({opacity: 1});	
});
	
	
	
 $('#button').hover(function() {
	$('#playerholder').fadeIn();
	}, function() {
			$('#playerholder').fadeOut();
		}); 

		
		
	
		
		
			// Get a reference to the message whose position
			// we want to "fix" on window-scroll.
			var message = $( "#button" );
 
			// Get the origional position of the message; we will
			// need this to compare to the view scroll for
			// reverting back to the original display position.
			var originalMessageTop = message.offset().top;
 
			// Get a reference to the window object; we will use
			// this several time, so cache the jQuery wrapper.
			var view = $( window );
 
 
			// Bind to the window scroll and resize events.
			// Remember, resizing can also change the scroll
			// of the page.
			view.bind(
				"scroll resize",
				function(){
 
					// Get the current scroll of the window.
					var viewTop = view.scrollTop();
 
					// Check to see if the view had scroll down
					// past the top of the original message top
					// AND that the message is not yet fixed.
					if (
						(viewTop > originalMessageTop) &&
						!message.is( ".site-message-fixed" )
						){
 
						// Toggle the message classes.
						message
							.removeClass( "site-message-absolute" )
							.addClass( "site-message-fixed" )
						;
 
					// Check to see if the view has scroll back up
					// above the message AND that the message is
					// currently fixed.
					} else if (
						(viewTop <= originalMessageTop) &&
						message.is( ".site-message-fixed" )
						){
 
						// Toggle the message classes.
						message
							.removeClass( "site-message-fixed" )
							.addClass( "site-message-absolute" )
						;
 
					}
				}
			);
		
		
		
		
		
		
		
		
		
		
		
		
		
});

jQuery(window).load(function(){
 
	
	});	


	
	
	
 
