| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- jQuery.noConflict();
- window.onscroll = function()
- {
- if( window.XMLHttpRequest ) {
- if (document.documentElement.scrollTop > 0 || self.pageYOffset > 0) {
- jQuery('#primary_left').css('position','fixed');
- jQuery('#primary_left').css('top','0');
- } else if (document.documentElement.scrollTop < 0 || self.pageYOffset < 0) {
- jQuery('#primary_left').css('position','absolute');
- jQuery('#primary_left').css('top','175px');
- }
- }
- }
- function initMenu() {
- jQuery('#menu ul ul').hide();
- jQuery('#menu ul li').click(function() {
- jQuery(this).parent().find("ul").slideUp('fast');
- jQuery(this).parent().find("li").removeClass("current");
- jQuery(this).find("ul").slideToggle('fast');
- jQuery(this).toggleClass("current");
- });
- }
-
-
- jQuery(document).ready(function() {
-
- Cufon.replace('h1, h2, h5, .notification strong', { hover: 'true' }); // Cufon font replacement
- initMenu(); // Initialize the menu!
-
- jQuery(".tablesorter").tablesorter(); // Tablesorter plugin
-
- jQuery('#dialog').dialog({
- autoOpen: false,
- width: 650,
- buttons: {
- "Done": function() {
- jQuery(this).dialog("close");
- },
- "Cancel": function() {
- jQuery(this).dialog("close");
- }
- }
- }); // Default dialog. Each should have it's own instance.
-
- jQuery('.dialog_link').click(function(){
- jQuery('#dialog').dialog('open');
- return false;
- }); // Toggle dialog
-
- jQuery('.notification').hover(function() {
- jQuery(this).css('cursor','pointer');
- }, function() {
- jQuery(this).css('cursor','auto');
- }); // Close notifications
-
- jQuery('.checkall').click(
- function(){
- jQuery(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked', jQuery(this).is(':checked'));
- }
- ); // Top checkbox in a table will select all other checkboxes in a specified column
-
- jQuery('.iphone').iphoneStyle(); //iPhone like checkboxes
- jQuery('.notification span').click(function() {
- jQuery(this).parents('.notification').fadeOut(800);
- }); // Close notifications on clicking the X button
-
- jQuery(".tooltip").easyTooltip({
- xOffset: -60,
- yOffset: 70
- }); // Tooltips!
-
- jQuery('#menu li:not(".current"), #menu ul ul li a').hover(function() {
- jQuery(this).find('span').animate({ marginLeft: '5px' }, 100);
- }, function() {
- jQuery(this).find('span').animate({ marginLeft: '0px' }, 100);
- }); // Menu simple animation
-
- jQuery('.fade_hover').hover(
- function() {
- jQuery(this).stop().animate({opacity:0.6},200);
- },
- function() {
- jQuery(this).stop().animate({opacity:1},200);
- }
- ); // The fade function
-
- //sortable, portlets
- jQuery(".column").sortable({
- connectWith: '.column',
- placeholder: 'ui-sortable-placeholder',
- forcePlaceholderSize: true,
- scroll: false,
- helper: 'clone'
- });
-
- jQuery(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all").find(".portlet-header").addClass("ui-widget-header ui-corner-all").prepend('<span class="ui-icon ui-icon-circle-arrow-s"></span>').end().find(".portlet-content");
- jQuery(".portlet-header .ui-icon").click(function() {
- jQuery(this).toggleClass("ui-icon-minusthick");
- jQuery(this).parents(".portlet:first").find(".portlet-content").toggle();
- });
- jQuery(".column").disableSelection();
-
- jQuery("table.stats").each(function() {
- if(jQuery(this).attr('rel')) { var statsType = jQuery(this).attr('rel'); }
- else { var statsType = 'area'; }
-
- var chart_width = (jQuery(this).parent().parent(".ui-widget").width()) - 60;
- jQuery(this).hide().visualize({
- type: statsType, // 'bar', 'area', 'pie', 'line'
- width: '800px',
- height: '240px',
- colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c']
- }); // used with the visualize plugin. Statistics.
- });
-
- jQuery(".tabs").tabs(); // Enable tabs on all '.tabs' classes
-
- jQuery( ".datepicker" ).datepicker();
-
- jQuery(".editor").cleditor({
- width: '800px'
- }); // The WYSIWYG editor for '.editor' classes
-
- // Slider
- jQuery(".slider").slider({
- range: true,
- values: [20, 70]
- });
-
- // Progressbar
- jQuery(".progressbar").progressbar({
- value: 40
- });
- });
|