(function($){
       
$(document).ready(function(){
	$('#btn_email4media').click(function() {
	  $(this).fadeOut();
	  $("#email4media_widget_box").delay(400).fadeIn();
	});
});

$(document).ready(function(){
	var scroll = $("#scroll");
	$(":range").rangeinput({
	
		// slide the DIV along with the range using jQuery's css() method
		onSlide: function(ev, step)  {
			scroll.css({left: -step});
		},
	
		// display progressbar
		progress: true,
	
		// initial value. also sets the DIV's initial scroll position
		value: 100,
	
		// this is called when the slider is clicked. we animate the DIV
		change: function(e, i) {
			scroll.animate({left: -i}, "fast");
		},
	
		// disable drag handle animation when when slider is clicked
		speed: 0
	
	});
});

$(document).ready(function(){
	$('#pkg2, #pkg3, #pkg4, #pkg5, #pkg6, #pkg7, #pkg8, #pkg9, #pkg10, #pkg11, #pkg12, #pkg13').hide();
	
	$('.reveal').click(function() {
		var id = $(this).attr('rel').toLowerCase();
		var $content = $('#' + id + ':not(:visible)');
		if ($('.current').length === 0) {
			showContent($content)
		}
		else {
			$('.current').fadeOut(600, function() {
				showContent($content)
			});
		}
		$('#yt-bg').remove();
		$('#yt').get(0).stopVideo();
	});
	
	function showContent(content) {
		content.fadeIn(600);
		$('.current').removeClass('current');
		content.addClass('current');
	}
});

$(document).ready(function(){				
	$('.fade').mosaic();
});

})(this.jQuery);




window.log = function(){
  log.history = log.history || [];   
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};
(function(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);



