/* time: 848ms */ /* file: jquery/jquery.debug.js (mtime: 2012-01-14 11:57:40) */ /* ** jquery.debug.js -- jQuery plugin for debugging ** Copyright (c) 2007 Ralf S. Engelschall ** Licensed under GPL ** ** $LastChangedDate$ ** $LastChangedRevision$ */ (function($) { /* jQuery class extension methods */ $.extend({ /* boolean status whether debugging is enabled */ _debug$: null, /* method for getting and setting debug status */ debug: function (onoff) { var old_value = ($._debug$ == true ? true : false); $._debug$ = (onoff ? true : false); return old_value; }, /* method for logging an object or message */ log: function (message) { if ($._debug$ == true) window.console.debug(message); } }); /* jQuery object extension methods */ $.fn.extend({ /* method for logging all jQuery items */ log: function (message) { if ($._debug$ == true) { return this.each(function () { if (typeof message !== "undefined") $.log(message); $.log(this); }); } } }); /* determine default enable status */ $(document).ready(function () { var req = $("html").attr("debug"); if (req == "true" || req == "false") $.debug(req == "true" ? true : false); }); /* minimum Firebug emulation (see http://getfirebug.com/firebug/firebugx.js) */ $(document).ready(function () { if (typeof window.console === "undefined") { /* minimum conversion of arbitrary object to text representation */ function object2text (obj) { var text = null; if (typeof obj === "undefined") text = "[undefined]"; else if (typeof obj === "boolean") text = (obj ? "true" : "false"); else if (typeof obj === "number") text = "" + obj; else if (typeof obj === "string") text = obj; else if (typeof obj === "function") text = obj; else if (typeof obj === "object") { if (typeof obj.nodeType !== "undefined") { if (obj.nodeType == 1) { /* W3C DOM element node */ text = '<'; text += obj.nodeName.toLowerCase(); for (var i = 0; i < obj.attributes.length; i++) text += ' ' + obj.attributes[i].nodeName.toLowerCase() + '="' + obj.attributes[i].nodeValue + '"'; text += '>'; } else if (obj.nodeType == 2) /* W3C DOM attribute node */ text = obj.nodeName + '="' + obj.nodeValue; else if (obj.nodeType == 3) /* W3C DOM text node */ text = obj.nodeValue; } else if (typeof obj.toJSONString !== "undefined") text = obj.toJSONString(); else if (typeof obj.toString !== "undefined") text = obj.toString(); } if (text == null) text = "[unknown]"; return text; }; /* create the custom console
node */ $(document).ready(function () { $("body") .append('
    '); $("#jQueryDebug") .css("display", "none") .css("fontFamily", "monospace") .css("backgroundColor", "#ffffff") .css("color", "#000000") .css("padding", "10px 0px 10px 0px") .css("border", "4px solid #666699") .css("margin", "4px 4px 4px 4px"); $("#jQueryDebug ol") .css("margin", "0px 0px 0px 0px") .css("paddingRight", "20px"); }); /* attach a logging function to each of the usual Firebug methods */ var names = [ "log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd" ]; var logfunc = function(msg) { $('#jQueryDebug') .css("display", $._debug$ == true ? "block" : "none"); $('#jQueryDebug ol') .append('
  1. ' + object2text(msg) + '
  2. ').css; $("#jQueryDebug ol li") .css("borderBottom", "1px solid #cccccc") .css("padding", "1px 10px 1px 10px"); }; window.console = {}; for (var i = 0; i < names.length; i++) window.console[names[i]] = logfunc; /* indicate that we are the one who is providing the Firebug interface */ window.console["jQueryDebug"] = true; } }); })(jQuery); /* file: jquery/tooltip.js (mtime: 2012-01-14 11:57:52) */ function rh_tooltip(target_items, name){ //jQuery.log("tooltip " + target_items); //console.log("tooltip " + target_items); jQuery(target_items+"."+name).each(function(i){ if(jQuery(this).attr("title") != "" && jQuery(this).attr("title") != "undefined" ){ jQuery(this) .mouseover(function(){ jQuery("#"+name+target_items+i).remove(); if (!jQuery(this).attr("tooltip")) { jQuery(this).attr("tooltip", jQuery(this).attr("title")); jQuery(this).removeAttr("title"); } var $title = jQuery(this).attr("tooltip"); var base64 = /^base64-(.+)$/; if (base64.test($title)) { var $erg = base64.exec($title); $title = jQuery.base64Decode($erg[1]); } jQuery("body").append( "
    " +"
    " +"

    " +"
    " +$title +"

    " +"
    " +"" +"
    " +"
    " ); jQuery("#"+name+target_items+i).css({opacity:1, display:"none"}).fadeIn(300); }) .mousemove(function(kmouse){ var border_top = jQuery(window).scrollTop(); var border_right = jQuery(window).width(); var left_pos; var top_pos; var offset = 0; var my_tooltip = jQuery("#"+name+target_items+i); //if(border_right - (offset * 2) >= my_tooltip.width() + kmouse.pageX){ //console.log("lp1:"+left_pos+"/"+border_right+"/"+my_tooltip.width()+"/"+offset); left_pos = kmouse.pageX + offset - 5; //console.log("lp1:"+kmouse.pageX+"+"+offset+"="+left_pos); //} else{ // left_pos = border_right - my_tooltip.width() - offset - 20; //console.log("lp2:"+border_right+"-"+my_tooltip.width()+"-"+offset+"="+left_pos); //} var intH = my_tooltip.height(); //if(border_top + (offset *2)>= kmouse.pageY - my_tooltip.height()){ // top_pos = border_top +offset; //} else{ top_pos = kmouse.pageY+offset+15; //} //console.log(left_pos+":"+top_pos); my_tooltip.css({left:left_pos, top:top_pos}); }) .mouseout(function(){ jQuery("#"+name+target_items+i).remove(); }); } }); } jQuery(document).ready(function(){ rh_tooltip("img","rh_tooltip"); rh_tooltip("span","rh_tooltip"); rh_tooltip("a","rh_tooltip"); }); /* file: jquery/jquery.toggleval.js (mtime: 2012-01-14 11:57:51) */ /* -------------------------------------------------- * * ToggleVal 3.0 * Updated: 01/15/2010 * -------------------------------------------------- * * Author: Aaron Kuzemchak * URL: http://aaronkuzemchak.com/ * Copyright: 2008-2010 Aaron Kuzemchak * License: MIT License ** -------------------------------------------------- */ (function($) { // main plugin function $.fn.toggleVal = function(theOptions) { // check whether we want real options, or to destroy functionality if(!theOptions || typeof theOptions == 'object') { theOptions = $.extend({}, $.fn.toggleVal.defaults, theOptions); } else if(typeof theOptions == 'string' && theOptions.toLowerCase() == 'destroy') { var destroy = true; } return this.each(function() { // unbind everything if we're destroying, and stop executing the script if(destroy) { $(this).unbind('focus.toggleval').unbind('blur.toggleval').removeData('defText'); return false; } // define our variables var defText = ''; // let's populate the field, if not default switch(theOptions.populateFrom) { case 'title': if($(this).attr('title')) { defText = $(this).attr('title'); $(this).val(defText); } break; case 'label': if($(this).attr('id')) { defText = $('label[for="' + $(this).attr('id') + '"]').text(); $(this).val(defText); } break; case 'custom': defText = theOptions.text; $(this).val(defText); break; default: defText = $(this).val(); } // let's give this field a special class, so we can identify it later // also, we'll give it a data attribute, which will help jQuery remember what the default value is $(this).addClass('toggleval').data('defText', defText); // now that fields are populated, let's remove the labels if applicable if(theOptions.removeLabels == true && $(this).attr('id')) { $('label[for="' + $(this).attr('id') + '"]').remove(); } // on to the good stuff... the focus and blur actions $(this).bind('focus.toggleval', function() { if($(this).val() == $(this).data('defText')) { $(this).val(''); } // add the focusClass, remove changedClass $(this).addClass(theOptions.focusClass); }).bind('blur.toggleval', function() { if($(this).val() == '' && !theOptions.sticky) { $(this).val($(this).data('defText')); } // remove focusClass, add changedClass if, well, different $(this).removeClass(theOptions.focusClass); if($(this).val() != '' && $(this).val() != $(this).data('defText')) { $(this).addClass(theOptions.changedClass); } else { $(this).removeClass(theOptions.changedClass); } }); }); }; // default options $.fn.toggleVal.defaults = { focusClass: 'tv-focused', // class during focus changedClass: 'tv-changed', // class after focus populateFrom: 'default', // choose from: default, label, custom, or title text: null, // text to use in conjunction with populateFrom: custom removeLabels: false, // remove labels associated with the fields sticky: false // if true, default text won't reappear }; // create custom selectors // :toggleval for affected elements // :changed for changed elements $.extend($.expr[':'], { toggleval: function(elem) { return $(elem).data('defText') || false; }, changed: function(elem) { if($(elem).data('defText') && $(elem).val() != $(elem).data('defText')) { return true; } return false; } }); })(jQuery); /* file: jquery/jquery.selectbox-0.5.js (mtime: 2012-01-14 11:57:50) */ /* * jQuery selectbox plugin * * Copyright (c) 2007 Sadri Sahraoui (brainfault.com) * Licensed under the GPL license and MIT: * http://www.opensource.org/licenses/GPL-license.php * http://www.opensource.org/licenses/mit-license.php * * The code is inspired from Autocomplete plugin (http://www.dyve.net/jquery/?autocomplete) * * Revision: $Id$ * Version: 0.5 * * Changelog : * Version 0.5 * - separate css style for current selected element and hover element which solve the highlight issue * Version 0.4 * - Fix width when the select is in a hidden div @Pawel Maziarz * - Add a unique id for generated li to avoid conflict with other selects and empty values @Pawel Maziarz */ jQuery.fn.extend({ selectbox: function(options) { return this.each(function() { new jQuery.SelectBox(this, options); }); } }); /* pawel maziarz: work around for ie logging */ if (!window.console) { var console = { log: function(msg) { } } } /* */ jQuery.SelectBox = function(selectobj, options) { var opt = options || {}; opt.inputClass = opt.inputClass || "selectbox"; opt.containerClass = opt.containerClass || "selectbox-wrapper"; opt.hoverClass = opt.hoverClass || "current"; opt.currentClass = opt.selectedClass || "selected" opt.debug = opt.debug || false; var elm_id = selectobj.id; var active = -1; var inFocus = false; var hasfocus = 0; //jquery object for select element var $select = $(selectobj); // jquery container object var $container = setupContainer(opt); //jquery input object var $input = setupInput(opt); // hide select and append newly created elements $select.hide().before($input).before($container); init(); $input .click(function(){ if (!inFocus) { $container.toggle(); } }) .focus(function(){ if ($container.not(':visible')) { inFocus = true; $container.show(); } }) .keydown(function(event) { switch(event.keyCode) { case 38: // up event.preventDefault(); moveSelect(-1); break; case 40: // down event.preventDefault(); moveSelect(1); break; //case 9: // tab case 13: // return event.preventDefault(); // seems not working in mac ! $('li.'+opt.hoverClass).trigger('click'); break; case 27: //escape hideMe(); break; } }) .blur(function() { if ($container.is(':visible') && hasfocus > 0 ) { if(opt.debug) console.log('container visible and has focus') } else { hideMe(); } }); function hideMe() { hasfocus = 0; $container.hide(); } function init() { $container.append(getSelectOptions($input.attr('id'))).hide(); //var width = $input.css('width'); //$container.width(width); $input.css("width", $select.css("width")); $container.css("top", "-" + ($container.height() - 20) + "px"); } function setupContainer(options) { var container = document.createElement("div"); $container = $(container); $container.attr('id', elm_id+'_container'); $container.addClass(options.containerClass); return $container; } function setupInput(options) { var input = document.createElement("input"); var $input = $(input); $input.attr("id", elm_id+"_input"); $input.attr("type", "text"); $input.addClass(options.inputClass); $input.attr("autocomplete", "off"); $input.attr("readonly", "readonly"); $input.attr("tabIndex", $select.attr("tabindex")); // "I" capital is important for ie return $input; } function moveSelect(step) { var lis = $("li", $container); if (!lis) return; active += step; if (active < 0) { active = 0; } else if (active >= lis.size()) { active = lis.size() - 1; } lis.removeClass(opt.hoverClass); $(lis[active]).addClass(opt.hoverClass); } function setCurrent() { var li = $("li."+opt.currentClass, $container).get(0); var ar = (''+li.id).split('_'); var el = ar[ar.length-1]; $select.val(el); $input.val($(li).html()); $input.trigger("onchange"); return true; } // select value function getCurrentSelected() { return $select.val(); } // input value function getCurrentValue() { return $input.val(); } function getSelectOptions(parentid) { var select_options = new Array(); var ul = document.createElement('ul'); $select.children('option').each(function() { var li = document.createElement('li'); li.setAttribute('id', parentid + '_' + $(this).val()); li.innerHTML = $(this).html(); if ($(this).is(':selected')) { $input.val($(this).html()); $(li).addClass(opt.currentClass); } ul.appendChild(li); $(li) .mouseover(function(event) { hasfocus = 1; if (opt.debug) console.log('over on : '+this.id); jQuery(event.target, $container).addClass(opt.hoverClass); }) .mouseout(function(event) { hasfocus = -1; if (opt.debug) console.log('out on : '+this.id); jQuery(event.target, $container).removeClass(opt.hoverClass); }) .click(function(event) { var fl = $('li.'+opt.hoverClass, $container).get(0); if (opt.debug) console.log('click on :'+this.id); $('li.'+opt.currentClass).removeClass(opt.currentClass); $(this).addClass(opt.currentClass); setCurrent(); hideMe(); }); }); return ul; } }; /* file: jquery/jquery.scrollTo-min.js (mtime: 2012-01-14 11:57:50) */ /** * jQuery.ScrollTo - Easy element scrolling using jQuery. * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 5/25/2009 * @author Ariel Flesler * @version 1.4.2 * * http://flesler.blogspot.com/2007/10/jqueryscrollto.html */ ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); /* file: jquery/jquery.equalcols.js (mtime: 2012-01-14 11:57:41) */ /** * @projectDescription Simple Equal Columns * @author Matt Hobbs * @version 0.01 */ jQuery.fn.equalCols = function(){ //Array Sorter var sortNumber = function(a,b){return b - a;}; var heights = []; //Push each height into an array $(this).each(function(){ heights.push($(this).height()); }); heights.sort(sortNumber); var maxHeight = heights[0]; return this.each(function(){ //Set each column to the max height $(this).css({'height': maxHeight}); }); }; /* file: jquery/jquery.jcarousel.js (mtime: 2012-01-14 11:57:42) */ /*! * jCarousel - Riding carousels with jQuery * http://sorgalla.com/jcarousel/ * * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Built on top of the jQuery library * http://jquery.com * * Inspired by the "Carousel Component" by Bill Scott * http://billwscott.com/carousel/ */ (function($) { /** * Creates a carousel for all matched elements. * * @example $("#mycarousel").jcarousel(); * @before
    • First item
    • Second item
    * @result * *
    *
    *
    *
      *
    • First item
    • *
    • Second item
    • *
    *
    *
    *
    *
    *
    * * @method jcarousel * @return jQuery * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. */ $.fn.jcarousel = function(o) { if (typeof o == 'string') { var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); return instance[o].apply(instance, args); } else return this.each(function() { $(this).data('jcarousel', new $jc(this, o)); }); }; // Default configuration properties. var defaults = { vertical: false, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: 'normal', easing: 'swing', auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: '
    ', buttonPrevHTML: '
    ', buttonNextEvent: 'click', buttonPrevEvent: 'click', buttonNextCallback: null, buttonPrevCallback: null }; /** * The jCarousel object. * * @constructor * @class jcarousel * @param e {HTMLElement} The element to create the carousel for. * @param o {Object} A set of key/value pairs to set as configuration properties. * @cat Plugins/jCarousel */ $.jcarousel = function(e, o) { this.options = $.extend({}, defaults, o || {}); this.locked = false; this.container = null; this.clip = null; this.list = null; this.buttonNext = null; this.buttonPrev = null; this.wh = !this.options.vertical ? 'width' : 'height'; this.lt = !this.options.vertical ? 'left' : 'top'; // Extract skin class var skin = '', split = e.className.split(' '); for (var i = 0; i < split.length; i++) { if (split[i].indexOf('jcarousel-skin') != -1) { $(e).removeClass(split[i]); skin = split[i]; break; } } if (e.nodeName == 'UL' || e.nodeName == 'OL') { this.list = $(e); this.container = this.list.parent(); if (this.container.hasClass('jcarousel-clip')) { if (!this.container.parent().hasClass('jcarousel-container')) this.container = this.container.wrap('
    '); this.container = this.container.parent(); } else if (!this.container.hasClass('jcarousel-container')) this.container = this.list.wrap('
    ').parent(); } else { this.container = $(e); this.list = this.container.find('ul,ol').eq(0); } if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) this.container.wrap('
    '); this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass('jcarousel-clip')) this.clip = this.list.wrap('
    ').parent(); this.buttonNext = $('.jcarousel-next', this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); this.buttonNext.addClass(this.className('jcarousel-next')); this.buttonPrev = $('.jcarousel-prev', this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); this.buttonPrev.addClass(this.className('jcarousel-prev')); this.clip.addClass(this.className('jcarousel-clip')).css({ overflow: 'hidden', position: 'relative' }); this.list.addClass(this.className('jcarousel-list')).css({ overflow: 'hidden', position: 'relative', top: 0, left: 0, margin: 0, padding: 0 }); this.container.addClass(this.className('jcarousel-container')).css({ position: 'relative' }); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var li = this.list.children('li'); var self = this; if (li.size() > 0) { var wh = 0, i = this.options.offset; li.each(function() { self.format(this, i++); wh += self.dimension(this, di); }); this.list.css(this.wh, wh + 'px'); // Only set if not explicitly passed as option if (!o || o.size === undefined) this.options.size = li.size(); } // For whatever reason, .show() does not work in Safari... this.container.css('display', 'block'); this.buttonNext.css('display', 'block'); this.buttonPrev.css('display', 'block'); this.funcNext = function() { self.next(); }; this.funcPrev = function() { self.prev(); }; this.funcResize = function() { self.reload(); }; if (this.options.initCallback != null) this.options.initCallback(this, 'init'); if ($.browser.safari) { this.buttons(false, false); $(window).bind('load.jcarousel', function() { self.setup(); }); } else this.setup(); }; // Create shortcut for internal use var $jc = $.jcarousel; $jc.fn = $jc.prototype = { jcarousel: '0.2.4' }; $jc.fn.extend = $jc.extend = $.extend; $jc.fn.extend({ /** * Setups the carousel. * * @method setup * @return undefined */ setup: function() { this.first = null; this.last = null; this.prevFirst = null; this.prevLast = null; this.animating = false; this.timer = null; this.tail = null; this.inTail = false; if (this.locked) return; this.list.css(this.lt, this.pos(this.options.offset) + 'px'); var p = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(p, false); $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); }, /** * Clears the list and resets the carousel. * * @method reset * @return undefined */ reset: function() { this.list.empty(); this.list.css(this.lt, '0px'); this.list.css(this.wh, '10px'); if (this.options.initCallback != null) this.options.initCallback(this, 'reset'); this.setup(); }, /** * Reloads the carousel and adjusts positions. * * @method reload * @return undefined */ reload: function() { if (this.tail != null && this.inTail) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = false; if (this.options.reloadCallback != null) this.options.reloadCallback(this); if (this.options.visible != null) { var self = this; var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; $('li', this.list).each(function(i) { wh += self.dimension(this, di); if (i + 1 < self.first) lt = wh; }); this.list.css(this.wh, wh + 'px'); this.list.css(this.lt, -lt + 'px'); } this.scroll(this.first, false); }, /** * Locks the carousel. * * @method lock * @return undefined */ lock: function() { this.locked = true; this.buttons(); }, /** * Unlocks the carousel. * * @method unlock * @return undefined */ unlock: function() { this.locked = false; this.buttons(); }, /** * Sets the size of the carousel. * * @method size * @return undefined * @param s {Number} The size of the carousel. */ size: function(s) { if (s != undefined) { this.options.size = s; if (!this.locked) this.buttons(); } return this.options.size; }, /** * Checks whether a list element exists for the given index (or index range). * * @method get * @return bool * @param i {Number} The index of the (first) element. * @param i2 {Number} The index of the last element. */ has: function(i, i2) { if (i2 == undefined || !i2) i2 = i; if (this.options.size !== null && i2 > this.options.size) i2 = this.options.size; for (var j = i; j <= i2; j++) { var e = this.get(j); if (!e.length || e.hasClass('jcarousel-item-placeholder')) return false; } return true; }, /** * Returns a jQuery object with list element for the given index. * * @method get * @return jQuery * @param i {Number} The index of the element. */ get: function(i) { return $('.jcarousel-item-' + i, this.list); }, /** * Adds an element for the given index to the list. * If the element already exists, it updates the inner html. * Returns the created element as jQuery object. * * @method add * @return jQuery * @param i {Number} The index of the element. * @param s {String} The innerHTML of the element. */ add: function(i, s) { var e = this.get(i), old = 0, add = 0; if (e.length == 0) { var c, e = this.create(i), j = $jc.intval(i); while (c = this.get(--j)) { if (j <= 0 || c.length) { j <= 0 ? this.list.prepend(e) : c.after(e); break; } } } else old = this.dimension(e); e.removeClass(this.className('jcarousel-item-placeholder')); typeof s == 'string' ? e.html(s) : e.empty().append(s); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var wh = this.dimension(e, di) - old; if (i > 0 && i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); return e; }, /** * Removes an element for the given index from the list. * * @method remove * @return undefined * @param i {Number} The index of the element. */ remove: function(i) { var e = this.get(i); // Check if item exists and is not currently visible if (!e.length || (i >= this.first && i <= this.last)) return; var d = this.dimension(e); if (i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); e.remove(); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); }, /** * Moves the carousel forwards. * * @method next * @return undefined */ next: function() { this.stopAuto(); if (this.tail != null && !this.inTail) this.scrollTail(false); else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); }, /** * Moves the carousel backwards. * * @method prev * @return undefined */ prev: function() { this.stopAuto(); if (this.tail != null && this.inTail) this.scrollTail(true); else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll); }, /** * Scrolls the tail of the carousel. * * @method scrollTail * @return undefined * @param b {Boolean} Whether scroll the tail back or forward. */ scrollTail: function(b) { if (this.locked || this.animating || !this.tail) return; var pos = $jc.intval(this.list.css(this.lt)); !b ? pos -= this.tail : pos += this.tail; this.inTail = !b; // Save for callbacks this.prevFirst = this.first; this.prevLast = this.last; this.animate(pos); }, /** * Scrolls the carousel to a certain position. * * @method scroll * @return undefined * @param i {Number} The index of the element to scoll to. * @param a {Boolean} Flag indicating whether to perform animation. */ scroll: function(i, a) { if (this.locked || this.animating) return; this.animate(this.pos(i), a); }, /** * Prepares the carousel and return the position for a certian index. * * @method pos * @return {Number} * @param i {Number} The index of the element to scoll to. */ pos: function(i) { var pos = $jc.intval(this.list.css(this.lt)); if (this.locked || this.animating) return pos; if (this.options.wrap != 'circular') i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); var back = this.first > i; // Create placeholders, new list width/height // and new list position var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; var c = back ? this.get(f) : this.get(this.last); var j = back ? f : f - 1; var e = null, l = 0, p = false, d = 0, g; while (back ? --j >= i : ++j < i) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); c[back ? 'before' : 'after' ](e); if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { g = this.get(this.index(j)); if (g.length) this.add(j, g.children().clone(true)); } } c = e; d = this.dimension(e); if (p) l += d; if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size)))) pos = back ? pos + d : pos - d; } // Calculate visible items var clipping = this.clipping(); var cache = []; var visible = 0, j = i, v = 0; var c = this.get(i - 1); while (++visible) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); // This should only happen on a next scroll c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e); if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { g = this.get(this.index(j)); if (g.length) this.add(j, g.find('>*').clone(true)); } } c = e; var d = this.dimension(e); if (d == 0) { alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); return 0; } if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) cache.push(e); else if (p) l += d; v += d; if (v >= clipping) break; j++; } // Remove out-of-range placeholders for (var x = 0; x < cache.length; x++) cache[x].remove(); // Resize list if (l > 0) { this.list.css(this.wh, this.dimension(this.list) + l + 'px'); if (back) { pos -= l; this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); } } // Calculate first and last item var last = i + visible - 1; if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) last = this.options.size; if (j > last) { visible = 0, j = last, v = 0; while (++visible) { var e = this.get(j--); if (!e.length) break; v += this.dimension(e); if (v >= clipping) break; } } var first = last - visible + 1; if (this.options.wrap != 'circular' && first < 1) first = 1; if (this.inTail && back) { pos += this.tail; this.inTail = false; } this.tail = null; if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom'); if ((v - m) > clipping) this.tail = v - clipping - m; } // Adjust position while (i-- > first) pos += this.dimension(this.get(i)); // Save visible item range this.prevFirst = this.first; this.prevLast = this.last; this.first = first; this.last = last; return pos; }, /** * Animates the carousel to a certain position. * * @method animate * @return undefined * @param p {Number} Position to scroll to. * @param a {Boolean} Flag indicating whether to perform animation. */ animate: function(p, a) { if (this.locked || this.animating) return; this.animating = true; var self = this; var scrolled = function() { self.animating = false; if (p == 0) self.list.css(self.lt, 0); if (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size) self.startAuto(); self.buttons(); self.notify('onAfterAnimation'); }; this.notify('onBeforeAnimation'); // Animate if (!this.options.animation || a == false) { this.list.css(this.lt, p + 'px'); scrolled(); } else { var o = !this.options.vertical ? {'left': p} : {'top': p}; this.list.animate(o, this.options.animation, this.options.easing, scrolled); } }, /** * Starts autoscrolling. * * @method auto * @return undefined * @param s {Number} Seconds to periodically autoscroll the content. */ startAuto: function(s) { if (s != undefined) this.options.auto = s; if (this.options.auto == 0) return this.stopAuto(); if (this.timer != null) return; var self = this; this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000); }, /** * Stops autoscrolling. * * @method stopAuto * @return undefined */ stopAuto: function() { if (this.timer == null) return; clearTimeout(this.timer); this.timer = null; }, /** * Sets the states of the prev/next buttons. * * @method buttons * @return undefined */ buttons: function(n, p) { if (n == undefined || n == null) { var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size) n = this.tail != null && !this.inTail; } if (p == undefined || p == null) { var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1) p = this.tail != null && this.inTail; } var self = this; this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent + '.jcarousel', this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent + '.jcarousel', this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) { this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }); this.buttonNext[0].jcarouselstate = n; } if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) { this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }); this.buttonPrev[0].jcarouselstate = p; } }, /** * Notify callback of a specified event. * * @method notify * @return undefined * @param evt {String} The event name */ notify: function(evt) { var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); // Load items this.callback('itemLoadCallback', evt, state); if (this.prevFirst !== this.first) { this.callback('itemFirstInCallback', evt, state, this.first); this.callback('itemFirstOutCallback', evt, state, this.prevFirst); } if (this.prevLast !== this.last) { this.callback('itemLastInCallback', evt, state, this.last); this.callback('itemLastOutCallback', evt, state, this.prevLast); } this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); }, callback: function(cb, evt, state, i1, i2, i3, i4) { if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) return; var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; if (!$.isFunction(callback)) return; var self = this; if (i1 === undefined) callback(self, state, evt); else if (i2 === undefined) this.get(i1).each(function() { callback(self, this, i1, state, evt); }); else { for (var i = i1; i <= i2; i++) if (i !== null && !(i >= i3 && i <= i4)) this.get(i).each(function() { callback(self, this, i, state, evt); }); } }, create: function(i) { return this.format('
  3. ', i); }, format: function(e, i) { var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ 'float': 'left', 'list-style': 'none' }); $e.attr('jcarouselindex', i); return $e; }, className: function(c) { return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); }, dimension: function(e, d) { var el = e.jquery != undefined ? e[0] : e; var old = !this.options.vertical ? el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom'); if (d == undefined || old == d) return old; var w = !this.options.vertical ? d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom'); $(el).css(this.wh, w + 'px'); return this.dimension(el); }, clipping: function() { return !this.options.vertical ? this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); }, index: function(i, s) { if (s == undefined) s = this.options.size; return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; } }); $jc.extend({ /** * Gets/Sets the global default configuration properties. * * @method defaults * @return {Object} * @param d {Object} A set of key/value pairs to set as configuration properties. */ defaults: function(d) { return $.extend(defaults, d || {}); }, margin: function(e, p) { if (!e) return 0; var el = e.jquery != undefined ? e[0] : e; if (p == 'marginRight' && $.browser.safari) { var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2; $.swap(el, old, function() { oWidth = el.offsetWidth; }); old['marginRight'] = 0; $.swap(el, old, function() { oWidth2 = el.offsetWidth; }); return oWidth2 - oWidth; } return $jc.intval($.css(el, p)); }, intval: function(v) { v = parseInt(v); return isNaN(v) ? 0 : v; } }); })(jQuery); /* file: jquery/jquery.base64.js (mtime: 2012-01-14 11:57:34) */ /** * jQuery BASE64 functions * * * Encodes the given data with base64. * String $.base64Encode ( String str ) *
    * Decodes a base64 encoded data. * String $.base64Decode ( String str ) *
    * * Encodes and Decodes the given data in base64. * This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies. * Base64-encoded data takes about 33% more space than the original data. * This javascript code is used to encode / decode data using base64 (this encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean). Script is fully compatible with UTF-8 encoding. You can use base64 encoded data as simple encryption mechanism. * If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag). * This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin. * * Example * Code * * $.base64Encode("I'm Persian."); * * Result * * "SSdtIFBlcnNpYW4u" * * Code * * $.base64Decode("SSdtIFBlcnNpYW4u"); * * Result * * "I'm Persian." * * * @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com > * @link http://www.semnanweb.com/jquery-plugin/base64.html * @see http://www.webtoolkit.info/ * @license http://www.gnu.org/licenses/gpl.html [GNU General Public License] * @param {jQuery} {base64Encode:function(input)) * @param {jQuery} {base64Decode:function(input)) * @return string */ (function($){ var keyString = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var uTF8Encode = function(string) { string = string.replace(/\x0d\x0a/g, "\x0a"); var output = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { output += String.fromCharCode(c); } else if ((c > 127) && (c < 2048)) { output += String.fromCharCode((c >> 6) | 192); output += String.fromCharCode((c & 63) | 128); } else { output += String.fromCharCode((c >> 12) | 224); output += String.fromCharCode(((c >> 6) & 63) | 128); output += String.fromCharCode((c & 63) | 128); } } return output; }; var uTF8Decode = function(input) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < input.length ) { c = input.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if ((c > 191) && (c < 224)) { c2 = input.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = input.charCodeAt(i+1); c3 = input.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } $.extend({ base64Encode: function(input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = uTF8Encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + keyString.charAt(enc1) + keyString.charAt(enc2) + keyString.charAt(enc3) + keyString.charAt(enc4); } return output; }, base64Decode: function(input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = keyString.indexOf(input.charAt(i++)); enc2 = keyString.indexOf(input.charAt(i++)); enc3 = keyString.indexOf(input.charAt(i++)); enc4 = keyString.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = uTF8Decode(output); return output; } }); })(jQuery); /* file: jquery/jquery.cookies.2.2.0.js (mtime: 2012-01-14 11:57:39) */ /** * Copyright (c) 2005 - 2010, James Auldridge * All rights reserved. * * Licensed under the BSD, MIT, and GPL (your choice!) Licenses: * http://code.google.com/p/cookies/wiki/License * */ var jaaulde = window.jaaulde || {}; jaaulde.utils = jaaulde.utils || {}; jaaulde.utils.cookies = ( function() { var resolveOptions, assembleOptionsString, parseCookies, constructor, defaultOptions = { expiresAt: null, path: '/', domain: null, secure: false }; /** * resolveOptions - receive an options object and ensure all options are present and valid, replacing with defaults where necessary * * @access private * @static * @parameter Object options - optional options to start with * @return Object complete and valid options object */ resolveOptions = function( options ) { var returnValue, expireDate; if( typeof options !== 'object' || options === null ) { returnValue = defaultOptions; } else { returnValue = { expiresAt: defaultOptions.expiresAt, path: defaultOptions.path, domain: defaultOptions.domain, secure: defaultOptions.secure }; if( typeof options.expiresAt === 'object' && options.expiresAt instanceof Date ) { returnValue.expiresAt = options.expiresAt; } else if( typeof options.hoursToLive === 'number' && options.hoursToLive !== 0 ) { expireDate = new Date(); expireDate.setTime( expireDate.getTime() + ( options.hoursToLive * 60 * 60 * 1000 ) ); returnValue.expiresAt = expireDate; } if( typeof options.path === 'string' && options.path !== '' ) { returnValue.path = options.path; } if( typeof options.domain === 'string' && options.domain !== '' ) { returnValue.domain = options.domain; } if( options.secure === true ) { returnValue.secure = options.secure; } } return returnValue; }; /** * assembleOptionsString - analyze options and assemble appropriate string for setting a cookie with those options * * @access private * @static * @parameter options OBJECT - optional options to start with * @return STRING - complete and valid cookie setting options */ assembleOptionsString = function( options ) { options = resolveOptions( options ); return ( ( typeof options.expiresAt === 'object' && options.expiresAt instanceof Date ? '; expires=' + options.expiresAt.toGMTString() : '' ) + '; path=' + options.path + ( typeof options.domain === 'string' ? '; domain=' + options.domain : '' ) + ( options.secure === true ? '; secure' : '' ) ); }; /** * parseCookies - retrieve document.cookie string and break it into a hash with values decoded and unserialized * * @access private * @static * @return OBJECT - hash of cookies from document.cookie */ parseCookies = function() { var cookies = {}, i, pair, name, value, separated = document.cookie.split( ';' ), unparsedValue; for( i = 0; i < separated.length; i = i + 1 ) { pair = separated[i].split( '=' ); name = pair[0].replace( /^\s*/, '' ).replace( /\s*$/, '' ); try { value = decodeURIComponent( pair[1] ); } catch( e1 ) { value = pair[1]; } if( typeof JSON === 'object' && JSON !== null && typeof JSON.parse === 'function' ) { try { unparsedValue = value; value = JSON.parse( value ); } catch( e2 ) { value = unparsedValue; } } cookies[name] = value; } return cookies; }; constructor = function(){}; /** * get - get one, several, or all cookies * * @access public * @paramater Mixed cookieName - String:name of single cookie; Array:list of multiple cookie names; Void (no param):if you want all cookies * @return Mixed - Value of cookie as set; Null:if only one cookie is requested and is not found; Object:hash of multiple or all cookies (if multiple or all requested); */ constructor.prototype.get = function( cookieName ) { var returnValue, item, cookies = parseCookies(); if( typeof cookieName === 'string' ) { returnValue = ( typeof cookies[cookieName] !== 'undefined' ) ? cookies[cookieName] : null; } else if( typeof cookieName === 'object' && cookieName !== null ) { returnValue = {}; for( item in cookieName ) { if( typeof cookies[cookieName[item]] !== 'undefined' ) { returnValue[cookieName[item]] = cookies[cookieName[item]]; } else { returnValue[cookieName[item]] = null; } } } else { returnValue = cookies; } return returnValue; }; /** * filter - get array of cookies whose names match the provided RegExp * * @access public * @paramater Object RegExp - The regular expression to match against cookie names * @return Mixed - Object:hash of cookies whose names match the RegExp */ constructor.prototype.filter = function( cookieNameRegExp ) { var cookieName, returnValue = {}, cookies = parseCookies(); if( typeof cookieNameRegExp === 'string' ) { cookieNameRegExp = new RegExp( cookieNameRegExp ); } for( cookieName in cookies ) { if( cookieName.match( cookieNameRegExp ) ) { returnValue[cookieName] = cookies[cookieName]; } } return returnValue; }; /** * set - set or delete a cookie with desired options * * @access public * @paramater String cookieName - name of cookie to set * @paramater Mixed value - Any JS value. If not a string, will be JSON encoded; NULL to delete * @paramater Object options - optional list of cookie options to specify * @return void */ constructor.prototype.set = function( cookieName, value, options ) { if( typeof options !== 'object' || options === null ) { options = {}; } if( typeof value === 'undefined' || value === null ) { value = ''; options.hoursToLive = -8760; } else if( typeof value !== 'string' ) { if( typeof JSON === 'object' && JSON !== null && typeof JSON.stringify === 'function' ) { value = JSON.stringify( value ); } else { throw new Error( 'cookies.set() received non-string value and could not serialize.' ); } } var optionsString = assembleOptionsString( options ); document.cookie = cookieName + '=' + encodeURIComponent( value ) + optionsString; }; /** * del - delete a cookie (domain and path options must match those with which the cookie was set; this is really an alias for set() with parameters simplified for this use) * * @access public * @paramater MIxed cookieName - String name of cookie to delete, or Bool true to delete all * @paramater Object options - optional list of cookie options to specify ( path, domain ) * @return void */ constructor.prototype.del = function( cookieName, options ) { var allCookies = {}, name; if( typeof options !== 'object' || options === null ) { options = {}; } if( typeof cookieName === 'boolean' && cookieName === true ) { allCookies = this.get(); } else if( typeof cookieName === 'string' ) { allCookies[cookieName] = true; } for( name in allCookies ) { if( typeof name === 'string' && name !== '' ) { this.set( name, null, options ); } } }; /** * test - test whether the browser is accepting cookies * * @access public * @return Boolean */ constructor.prototype.test = function() { var returnValue = false, testName = 'cT', testValue = 'data'; this.set( testName, testValue ); if( this.get( testName ) === testValue ) { this.del( testName ); returnValue = true; } return returnValue; }; /** * setOptions - set default options for calls to cookie methods * * @access public * @param Object options - list of cookie options to specify * @return void */ constructor.prototype.setOptions = function( options ) { if( typeof options !== 'object' ) { options = null; } defaultOptions = resolveOptions( options ); }; return new constructor(); } )(); ( function() { if( window.jQuery ) { ( function( $ ) { $.cookies = jaaulde.utils.cookies; var extensions = { /** * $( 'selector' ).cookify - set the value of an input field, or the innerHTML of an element, to a cookie by the name or id of the field or element * (field or element MUST have name or id attribute) * * @access public * @param options OBJECT - list of cookie options to specify * @return jQuery */ cookify: function( options ) { return this.each( function() { var i, nameAttrs = ['name', 'id'], name, $this = $( this ), value; for( i in nameAttrs ) { if( ! isNaN( i ) ) { name = $this.attr( nameAttrs[ i ] ); if( typeof name === 'string' && name !== '' ) { if( $this.is( ':checkbox, :radio' ) ) { if( $this.attr( 'checked' ) ) { value = $this.val(); } } else if( $this.is( ':input' ) ) { value = $this.val(); } else { value = $this.html(); } if( typeof value !== 'string' || value === '' ) { value = null; } $.cookies.set( name, value, options ); break; } } } } ); }, /** * $( 'selector' ).cookieFill - set the value of an input field or the innerHTML of an element from a cookie by the name or id of the field or element * * @access public * @return jQuery */ cookieFill: function() { return this.each( function() { var n, getN, nameAttrs = ['name', 'id'], name, $this = $( this ), value; getN = function() { n = nameAttrs.pop(); return !! n; }; while( getN() ) { name = $this.attr( n ); if( typeof name === 'string' && name !== '' ) { value = $.cookies.get( name ); if( value !== null ) { if( $this.is( ':checkbox, :radio' ) ) { if( $this.val() === value ) { $this.attr( 'checked', 'checked' ); } else { $this.removeAttr( 'checked' ); } } else if( $this.is( ':input' ) ) { $this.val( value ); } else { $this.html( value ); } } break; } } } ); }, /** * $( 'selector' ).cookieBind - call cookie fill on matching elements, and bind their change events to cookify() * * @access public * @param options OBJECT - list of cookie options to specify * @return jQuery */ cookieBind: function( options ) { return this.each( function() { var $this = $( this ); $this.cookieFill().change( function() { $this.cookify( options ); } ); } ); } }; $.each( extensions, function( i ) { $.fn[i] = this; } ); } )( window.jQuery ); } } )(); /* file: jquery/jquery.textshadow.js (mtime: 2012-01-14 11:57:51) */ /* Created by Martin Hintzmann 2008 martin [a] hintzmann.dk * MIT (http://www.opensource.org/licenses/mit-license.php) licensed. * * Version: 0.2 * Requires: jQuery 1.2+ * http://plugins.jquery.com/project/textshadow * */ (function($) { $.fn.textShadow = function(option) { if (!$.browser.msie) return; var IE6 = $.browser.version < 7; return this.each(function() { var el = $(this); var shadow = el.textShadowParse(this.currentStyle["text-shadow"]); shadow = $.extend(shadow, option); el.textShadowRemove(); if (shadow.x == 0 && shadow.y == 0 && shadow.radius == 0) return; if (el.css("position")=="static") { el.css({position:"relative"}); } el.css({zIndex:"0"}); if (IE6) { el.css({zoom:"1"}); } var span=document.createElement("span"); $(span).addClass("jQueryTextShadow"); $(span).html(el.html()); $(span).css({ padding: this.currentStyle["padding"], width: el.width(), position: "absolute", zIndex: "-1", color: shadow.color!=null?shadow.color:el.css("color"), left: (-parseInt(shadow.radius)+parseInt(shadow.x))+"px", top: (-parseInt(shadow.radius)+parseInt(shadow.y))+"px" }); if (shadow.radius != 0) { if (shadow.opacity != null) { $(span).css("filter", "progid:DXImageTransform.Microsoft.Blur(pixelradius="+parseInt(shadow.radius)+", enabled='true', makeShadow='true', ShadowOpacity="+shadow.opacity+")"); } else { $(span).css("filter", "progid:DXImageTransform.Microsoft.Blur(pixelradius="+parseInt(shadow.radius)+", enabled='true')"); } } el.append(span); }); }; $.fn.textShadowParse = function(value) { value = String(value) .replace(/^\s+|\s+$/gi, '') .replace(/\s*!\s*important/i, '') .replace(/\(\s*([^,\)]+)\s*,\s*([^,\)]+)\s*,\s*([^,\)]+)\s*,\s*([^\)]+)\s*\)/g, '($1/$2/$3/$4)') .replace(/\(\s*([^,\)]+)\s*,\s*([^,\)]+)\s*,\s*([^\)]+)\s*\)/g, '($1/$2/$3)') var shadow = { x : 0, y : 0, radius : 0, color : null }; if (value.length > 1 || value[0].toLowerCase() != 'none') { value = value.replace(/\//g, ','); var color; if ( value.match(/(\#[0-9a-f]{6}|\#[0-9a-f]{3}|(rgb|hsb)a?\([^\)]*\)|\b[a-z]+\b)/i) && (color = RegExp.$1) ) { shadow.color = color.replace(/^\s+/, ''); value = value.replace(shadow.color, ''); } value = value .replace(/^\s+|\s+$/g, '') .split(/\s+/) .map(function(item) { return (item || '').replace(/^0[a-z]*$/, '') ? item : 0 ; }); switch (value.length) { case 1: shadow.x = shadow.y = value[0]; break; case 2: shadow.x = value[0]; shadow.y = value[1]; break; case 3: shadow.x = value[0]; shadow.y = value[1]; shadow.radius = value[2]; break; } if ((!shadow.x && !shadow.y && !shadow.radius) || shadow.color == 'transparent') { shadow.x = shadow.y = shadow.radius = 0; shadow.color = null; } } return shadow; }; $.fn.textShadowRemove = function() { if (!$.browser.msie) return; return this.each(function() { $(this).children("span.jQueryTextShadow").remove(); }); }; })(jQuery); if(typeof Array.prototype.map == 'undefined') { Array.prototype.map = function(fnc) { var a = new Array(this.length); for (var i = 0; i < this.length; i++) { a[i] = fnc(this[i]); } return a; } } /* file: jquery/json.js (mtime: 2012-01-14 11:57:51) */ (function ($) { var m = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }, s = { 'array': function (x) { var a = ['['], b, f, i, l = x.length, v; for (i = 0; i < l; i += 1) { v = x[i]; f = s[typeof v]; if (f) { v = f(v); if (typeof v == 'string') { if (b) { a[a.length] = ','; } a[a.length] = v; b = true; } } } a[a.length] = ']'; return a.join(''); }, 'boolean': function (x) { return String(x); }, 'null': function (x) { return "null"; }, 'number': function (x) { return isFinite(x) ? String(x) : 'null'; }, 'object': function (x) { if (x) { if (x instanceof Array) { return s.array(x); } var a = ['{'], b, f, i, v; for (i in x) { v = x[i]; f = s[typeof v]; if (f) { v = f(v); if (typeof v == 'string') { if (b) { a[a.length] = ','; } a.push(s.string(i), ':', v); b = true; } } } a[a.length] = '}'; return a.join(''); } return 'null'; }, 'string': function (x) { if (/["\\\x00-\x1f]/.test(x)) { x = x.replace(/([\x00-\x1f\\"])/g, function(a, b) { var c = m[b]; if (c) { return c; } c = b.charCodeAt(); return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); }); } return '"' + x + '"'; } }; $.toJSON = function(v) { var f = isNaN(v) ? s[typeof v] : s['number']; if (f) return f(v); }; $.parseJSON = function(v, safe) { if (safe === undefined) safe = $.parseJSON.safe; if (safe && !/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v)) return undefined; return eval('('+v+')'); }; $.parseJSON.safe = false; })(jQuery); /* file: jquery/jquery.dataSelector.js (mtime: 2012-01-14 11:57:40) */ /* Copyright (c) 2009, Pim Jager All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name Pim Jager may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY Pim Jager ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Pim Jager BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Credits for RegEx selector go to Anon: See his comment on: http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/ */ (function($){ //We use a small helper function that will return true when 'a' is undefined (so we can do if(checkUndefined(data)) return false; //If we would continue with undefined data we would throw error as we would be getting properties of an //non-exsitent object (ie typeof data === 'undefined'; data.fooBar; //throws error var checkUndefined = function(a) { return typeof a === 'undefined'; } $.expr[':'].data = function(elem, counter, params){ if(checkUndefined(elem) || checkUndefined(params)) return false; //:data(__) accepts 'dataKey', 'dataKey=Value', 'dataKey.InnerdataKey', 'dataKey.InnerdataKey=Value' //Also instead of = we accept: != (does not equal Value), ^= (starts with Value), // $= (ends with Value), *=Value (contains Value) ~=Regex returns where data matches regex //$(elem).data(dataKey) or $(elem).data(dataKey)[innerDataKey] (optional more innerDataKeys) //When no value is speciefied we return all elements that have the dataKey specified, similar to [attribute] var query = params[3]; //The part in the parenthesis, thus: selector:data( query ) if(!query) return false; //query can not be anything that evaluates to false, it has to be string var querySplitted = query.split('='); //for dataKey=Value/dataKey.innerDataKey=Value //We check if the condition was an =, an !=, an $= or an *= var selectType = querySplitted[0].charAt( querySplitted[0].length-1 ); if(selectType == '^' || selectType == '$' || selectType == '!' || selectType == '*' || selectType == '~'){ //we need to remove the last char from the dataName (queryplitted[0]) because we plitted on the = //so the !,$,*,^ are still part of the dataname querySplitted[0] = querySplitted[0].substring(0, querySplitted[0].length-1); } else selectType = '='; var dataName = querySplitted[0]; //dataKey or dataKey.innerDataKey //Now we go check if we need dataKey or dataKey.innerDataKey var dataNameSplitted = dataName.split('.'); var data = $(elem).data(dataNameSplitted[0]); if(checkUndefined(data)) return false; if(dataNameSplitted[1]){//We have innerDataKeys for(i=1, x=dataNameSplitted.length; i') .end(); jQuery(".rh-portlet-header.rh-toggable .ui-icon").click(function() { jQuery(this).toggleClass("ui-icon-triangle-1-s"); jQuery(this).parents(".rh-portlet:first").find(".rh-portlet-content").toggle(200); }); } function rhInitCmsImages() { jQuery(".rh_cmsimg").each(function() { jQuery(this).click(function() { jQuery(":ui-dialog").dialog("destroy"); $img = jQuery(this).find("img"); $width = ($img.attr("owidth") ? (parseInt($img.attr("owidth"))) : 400); $height = ($img.attr("oheight") ? (parseInt($img.attr("oheight"))) : 200); jQuery("
    ").dialog({ title: null, autoOpen: true, modal: true, width: $width + 30, height: $height + 60, autoResize: true, resizable: true, position: "top", overlay: { opacity: 0.5, background: "black" } }) .click(function(){ jQuery(":ui-dialog").dialog("destroy"); }) .css("cursor","pointer") .find("img").attr("title", "Schließen"); jQuery(".ui-dialog-titlebar").css("line-height", "10px"); }) .attr("title","Klick zum vergrößern") .css("cursor", "pointer"); }); } function rhInitPiclayer() { jQuery(".rh_piclayer").mouseover(function() { //jQuery(".titel_bg, .titel_text", this).hide(); jQuery(".overlay", this).show(); }).mouseout(function() { jQuery(".overlay", this).hide(); //jQuery(".titel_bg, .titel_text", this).show(); }); } function rhUpdateTooltips() { rh_tooltip("img","rh_tooltip"); rh_tooltip("span","rh_tooltip"); rh_tooltip("a","rh_tooltip"); rh_tooltip("div", "rh_tooltip"); //rh_tooltip("select", "rh_tooltip"); //rh_tooltip("input", "rh_tooltip"); } function rhShowWait(id, text) { rhHideWait(id); var elem = jQuery("#"+id); if (!elem.hasClass("rh_waitable")) { elem.addClass("rh_waitable"); } if (text) { elem.prepend("
    " + text + "
    "); } else { elem.prepend("
    "); } } function rhHideWait(id) { jQuery("#"+id).removeClass("rh_waitable"); jQuery("#"+id+" .rh_wait").remove(); jQuery("#"+id+" .rh_wait_text").remove(); } /* function rhInitHelpLinks() { jQuery(".rh-page-help").each(function() { var $link = jQuery(this); $link.click(function() { var $dialog = jQuery("
    ") .load("/cms/getDialog/?page=" + escape($link.attr("href"))) .dialog({ title: $link.attr("title"), width: 500, height: 300 }); return false; }); }); } */ function rhShowDialogCmsPage(title, page) { jQuery("#rh-dialog-modal").remove(); var url = "/cms/getDialog?page=" + escape(page); var dialogopts = { width: 600, height: 400, modal: true, //autoOpen: false, title: title }; jQuery("
    ").dialog(dialogopts); rhShowWait("rh-dialog-modal"); jQuery.get(url, function (data) { rhHideWait("rh-dialog-modal"); jQuery("#rh-dialog-modal").html(data); }); } /* file: rhflow/shop.js.php (mtime: 2012-01-14 11:57:55) */ function shoplistRemoveItem(item) { var url = "/shop/removeitm/item/" + item; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); rhShowWait("itm_" + item); jQuery.get(url, function (data) { jQuery("#itm_" + item).remove(); shoplistUpdatePrice(); }); } function shoplistUpdateItem(item, type) { var val = jQuery("#itm_" + type + "_" + item).val(); //jQuery.log("type "+type+", val: "+val + " jq("+"#itm_" + type + "_" + item); var url = "/shop/updateitm/item/" + item + "/" + type + "/" + val; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); rhShowWait("itm_" + item); jQuery.get(url, function (data) { jQuery("#itm_" + item).html(data); rhUpdateTooltips(); rhHideWait("itm_" + item); shoplistUpdatePrice(); }); } function shoplistUpdatePrice() { var url = "/shop/getpricesum"; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); rhShowWait("shoppricesum"); jQuery.get(url, function (data) { jQuery("#shoppricesum").html(data); rhInitGuiElements(); rhHideWait("shoppricesum"); }); } function shopRemoveAllFotos() { chk = confirm("Wollen Sie wirklich alle Einträge in der Fotobox löschen?"); if (chk) { var url = "/shop/removeAll"; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery.get(url, function (data) { jQuery("#shopout").html(data); shoplistUpdatePrice(); }); } } /* file: rhflow/maps.js.php (mtime: 2012-01-14 11:57:54) */ function rhLoadGoogleMapAddress(strElementId, strAdresse) { if (typeof GBrowserIsCompatible != "undefined" && GBrowserIsCompatible() ) { var objMap = new GMap2(document.getElementById(strElementId)); if (objMap) { objMap.addControl(new GSmallMapControl()); objMap.enableScrollWheelZoom(); var objGeoCoder = new GClientGeocoder(); if (objGeoCoder) { objGeoCoder.getLatLng(strAdresse, function (_objLatLng) { objMap.setCenter(_objLatLng, 13); var objMarker = new GMarker(_objLatLng); if (objMarker) { objMap.addOverlay(objMarker); } } ); } } } } function rhLoadGoogleMapKml(strElementId, strKml, intCenterLat, intCenterLng, intZoom) { if (typeof GBrowserIsCompatible != "undefined" && GBrowserIsCompatible() ) { var objMap = new GMap2(document.getElementById(strElementId)); if (objMap) { objMap.addControl(new GSmallMapControl()); objMap.enableScrollWheelZoom(); geoXml = new GGeoXml(strKml); objMap.setCenter(new GLatLng(intCenterLat,intCenterLng), (intZoom ? intZoom : 8)); objMap.addOverlay(geoXml); } } } /* file: rhflow/foto.js.php (mtime: 2012-01-14 11:57:54) */ function rhMessageHide(id) { jQuery("#"+id).animate({ "height": "toggle", "opacity": "toggle" }, "slow"); } function rhMessageShow(id) { jQuery("#"+id).animate({ "height": "toggle", "opacity": "toggle" }, "slow"); } function shopInitFotoTeaser() { var box = jQuery("div.fotobox-teaser") var ul = jQuery("div.fotobox-teaser ul"); jQuery('li > div > div.data', ul).hide(); var itemsWidth = 50; jQuery("li > div", ul).each(function() { itemsWidth+= jQuery(this).outerWidth(); }); itemsWidth-= box.outerWidth(); jQuery("li > div", ul).each(function() { var data = jQuery("div.data", this); jQuery("div.pic", this).click(function() { if (data.css("display") == "none") { jQuery("div.data", ul).hide(200); jQuery("li > div", ul).removeClass("selected ui-corner-all"); data.parent().addClass("selected ui-corner-all"); data.show(200); } else { data.hide(200); } shopFotoTeaserUpdateSlider(); }); }); jQuery("div.fotobox-teaser-slider").slider({ min: 0, max: 100, slide: function (ev, ui) { ul.css("left", "-" + ui.value + "px"); }, stop: function (ev, ui) { ul.animate({"left" : "-" + ui.value + "px"}, 500); } }); shopFotoTeaserUpdateSlider(); //jQuery(".fotobox-teaser").lightBox(); //TB_init(); } function shopFotoTeaserUpdateSlider() { var itemsWidth = 50; jQuery("div.fotobox-teaser ul li > div").each(function() { itemsWidth+= jQuery(this).outerWidth(); }); itemsWidth-= jQuery("div.fotobox-teaser").outerWidth(); jQuery("div.fotobox-teaser-slider").slider('option','max',itemsWidth); } function shopAddFoto(album, foto, id) { album = album.replace(/\//g,"---"); foto = foto.replace(/\s/g,"_"); var url = "/shop/add/album/" + (album != "" ? album : "unknown") + "/foto/" + foto; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); if (jQuery("#shopout").css("display") == "none") { jQuery("#shopout").show(200); } rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopAddFotoMinishowcase(inum) { var album = active_id.replace(/\//g,"---"); var foto = image_list[inum]["image"].replace(/\.jpg/i,""); var id = "thimg_" + inum; var url = "/shop/add/album/" + (album != "" ? album : "unknown") + "/foto/" + foto; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); if (jQuery("#shopout").css("display") == "none") { jQuery("#shopout").show(); } rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopAddEvent(event, album, foto, id, size) { event = event.replace(/\//g,"---"); album = album.replace(/\//g,"---"); foto = foto.replace(/\//g,"---"); size = size ? size : "dvd" var url = "/shop/add/event/" + event + "/album/" + album + "/foto/" + foto + "/size/" + size; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery.scrollTo("#shopout", 300); if (jQuery("#shopout").css("display") == "none") { jQuery("#shopout").show(); } jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopRemoveFoto(album, foto, id) { album = album.replace(/\//g,"---"); foto = foto.replace(/\s/g,"_"); var url = "/shop/remove/album/" + (album != "" ? album : "unknown") + "/foto/" + foto; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopRemoveFotoMinishowcase(inum) { var album = active_id.replace(/\//g,"---"); var foto = image_list[inum]["image"].replace(/\.jpg/i,""); var id = "thimg_" + inum; var url = "/shop/remove/album/" + (album != "" ? album : "unknown") + "/foto/" + foto; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopRemoveEvent(event, id) { var url = "/shop/remove/event/" + event; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function shopRemoveFotoFotobox(id) { var url = "/shop/remove/item/" + id; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#" + id).effect("transfer", { to: jQuery("#shop_items_count") }, 800); rhShowWait("shopout"); jQuery.get(url, function (data) { jQuery("#shopout").html(data); rhInitFotoalbumLightbox("a.lightbox"); rhHideWait("shopout"); }); } function rhFotoLoadAlbum(album, filter, order, opts) { target = opts && opts["target"] ? opts["target"] : "fotoalbumout"; scrollto = opts && opts["scrollto"] ? opts["scrollto"] : false; version = opts && opts["version"] ? opts["version"] : 1; notitle = opts && opts["notitle"] ? opts["notitle"] : 0; //console.log("target: "+target); //readonly = opts["readonly"] ? opts["readonly"] : 0; jQuery("#"+target).data("album", album); album = album.replace(/\//g,"---"); var url = "/foto/getAlbumNew/album/" + album; if (filter) { url+= "/filter/" + filter; } if (order) { url+= "/order/" + order; } if (notitle) { url+= "/notitle/" + notitle; } if (version) { url+= "/version/" + version; } url+= "/target/" + target; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); //console.log(url); if (scrollto) { jQuery.scrollTo("#"+target, 300); } jQuery("#"+target).slideUp(300, function() { target = jQuery(this).attr("id"); //console.log("load "+target); jQuery(this).html("


    ").slideDown(); rhShowWait(target,"Lade Album " + album + ""); jQuery("#articletext").hide(300); jQuery("#articletext_show").show(300); jQuery.ajax({ "url": url, "type": "GET", //"async": false, // blockiert den Browser!! "success": function (data) { target = jQuery("
    ").html(data).find(".fotoalbum_target").html(); //console.log("result for "+target+" "+data.length); jQuery("#"+target).html(data); rhHideWait(target); } }); }); } function rhFotoAlbumApplyFilter() { album = jQuery("#fotoalbumout").data("album"); filter = jQuery("select[name=filterby]").val(); rhFotoLoadAlbum(album, filter); } function rhFotoAlbumApplyOrderby() { album = jQuery("#fotoalbumout").data("album"); order = jQuery("select[name=orderby]").val(); rhFotoLoadAlbum(album, "", order); } function rhRatePicture(opts) { album = opts.album || ""; file = opts.file || ""; rate = opts.rate || 0; output = opts.output || ""; album = album.replace(/\//g,"---"); var url = "/rating/foto/album/" + album + "/file/" + file + "/rating/" + rate; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery.get(url, function (data) { if (output) { jQuery(output).html(data); } else { alert(data); } }); } function rhFotoInitRating(div, albumid) { var $div = div; var $albumid = albumid; jQuery($div).unbind("mouseover"); var $formid = jQuery($div).attr("formid"); var $rel = jQuery($div).attr("rel"); var $rating = jQuery($div).attr("rating"); var $html = "
    "; $html += "\n" + ""; $html += "\n" + ""; $html += "\n" + ""; $html += "\n" + ""; $html += "\n" + ""; $html += "\n" + ""; $html+= "
    "; jQuery($div).css("background","url(/app/images/layout/no.gif)"); jQuery($div).html($html); // enable rating form var $ratingform = jQuery("#rh-rating-" + $formid); jQuery(":radio", $ratingform).rating({ callback: function(value, link){ rhRatePicture({ album: $albumid, file: jQuery($div).attr("rel"), rate: value, output: "#rate-out-" + jQuery(this).attr("rel").replace(/\./,"-") }); }, required: false, }); jQuery(".rating-cancel",$ratingform).remove(); jQuery($ratingform).show(); } /* file: rhflow/foto-v3.js.php (mtime: 2012-01-14 11:57:54) */ function rhInitFotoAlbumV3() { jQuery(".rh_albumpics li").each(function(){ jQuery(this).hoverIntent({ interval: 250, timeout: 250, over: function(){ rhFotoAlbumV3Show(this); }, //out: function(){ // jQuery(".rh_zoom").remove(); //} }); //.mouseleave(function(){ // jQuery(".rh_zoom").remove(); //}); }); // jQuery(".rh_albumpics li").each } function rhInitFotoalbumLightbox(_strIdent) { jQuery(_strIdent).lightBox({ imageLoading: "/app/images/layout/wait.gif", imageBtnClose: "/app/images/layout/lightbox/lightbox-btn-close.gif", imageBtnNext: "/app/images/layout/lightbox/lightbox-btn-next.gif", imageBtnPrev: "/app/images/layout/lightbox/lightbox-btn-prev.gif", imageBlank: "/app/images/layout/lightbox/lightbox-blank.gif", txtImage: "Foto", txtOf: "von", containerResizeSpeed: 0, //fixedNavigation: true, callbackOnShowImageData: function(img) { if (!img) { return; } strTxt = ""; if (jQuery(img).data("fotoid")) { strTxt+= "
    " + jQuery(img).data("fotoid") + "
    "; } if (jQuery(img).data("remember")) { //console.log("id: "+jQuery(img).data("remember").id); arrRem = jQuery(img).data('remember'); strTxt+= "
    " + "" + "
    " + "
    "; } strRateInit = ""; if (jQuery(img).data("rating")) { arrRating = jQuery(img).data("rating"); strRateInit = arrRating.rel; strTxt+= "
    " + "
    Bewertung:
    " + "
    " + "

    " + "
    (" + arrRating.count + ")
    " + "

    " + "
    " + "
    "; } if (jQuery(img).data("comments")) { arrCom = jQuery(img).data("comments"); strTxt+= ""; } //strTxt+= "

    "; jQuery("#lightbox-image-details").html(strTxt); // Rating initialisieren jQuery("#lightbox-image-details").find(".rh-stars") .mouseover(function(){ rhFotoInitRating(this,strRateInit); }); // visualisieren dass neues Foto geladen wurde jQuery("#lightbox-foto-nr").effect("highlight",{},500); } }); } function rhFotoAlbumV3Show(_objPic) { jQuery(".rh_zoom").remove(); objImg = jQuery(_objPic).find("img").clone(); objData = jQuery(_objPic).find(".rh_data"); intId = parseInt(jQuery(objData).find(".rh_id").html()); strName = jQuery(objData).find(".rh_name").html(); strImage = jQuery(objData).find(".rh_image").html(); strFile = jQuery(objData).find(".rh_file").html(); strAlbum = jQuery(objData).find(".rh_album").html(); strRel = jQuery(objData).find(".rh_rel").html(); intRate = parseInt(jQuery(objData).find(".rh_rate").html()); intRateSum = parseInt(jQuery(objData).find(".rh_ratesum").html()); intComments = parseInt(jQuery(objData).find(".rh_comments").html()); strThumb = jQuery(objData).find(".rh_thumb").html(); intThumbSize = parseInt(jQuery(objData).find(".rh_thumbsize").html()); strXxlThumb = jQuery(objData).find(".rh_xxlthumb").html(); intXxlThumbSize = parseInt(jQuery(objData).find(".rh_xxlthumbsize").html()); dblScaleXY = jQuery(objData).find(".rh_scalexy").html(); strOptions = "" + "
    " // links + "
    no." + strName + "
    " + "
    " + "

    " + "
    (" + intRateSum + ")
    " + "
    " // rechts + "
    " + "x
    " + "
    " + "merken
    "; if (intComments == 0) { strOptions+= "" + ""; } else { strOptions+= "" + ""; } strOptions+= "" + "

    " + "
    "; intPadding = 3 * 2; // padding * 2 intStartWidth = parseInt(jQuery(objImg).attr("width")) + intPadding; jQuery(objImg) .removeAttr("width") .removeAttr("height") .css("width", "100%") .attr("src", strXxlThumb) //.attr("title", "Vergrößern") //.attr("alt", "Vergrößern") .css("cursor", "pointer") .click(function(){ jQuery("#link_" + intId).trigger("click"); }); //console.log("URL: "+jQuery(objImg).wrap("div").parent().html()); // Animation-Ziele berechnen intEndWidth = intXxlThumbSize + intPadding; intEndLeft = parseInt((intThumbSize - intXxlThumbSize) / 2); intEndTop = parseInt((intThumbSize - intXxlThumbSize) / dblScaleXY / 2); //console.log("scale: "+dblScaleXY); if (dblScaleXY < 1) { intEndWidth = parseInt(intXxlThumbSize * dblScaleXY) + intPadding; intEndLeft = parseInt((intThumbSize - intXxlThumbSize) * dblScaleXY / 2); intEndTop = parseInt((intThumbSize - intXxlThumbSize) / dblScaleXY / 2); } //console.log("width: "+intStartWidth+" / endwidth: "+intEndWidth+" / endtop: "+intEndTop+" / endleft: "+intEndLeft); jQuery(_objPic) .css("position", "relative") .append("" + "
    " + "
    " + "

    " + "
    " + "
    ") .find(".rh_padding") .prepend(strOptions) .prepend(objImg) .parent() // .rh_zoom .mouseleave(function(){ //jQuery(this).remove(); }) .show(50) .delay(500) .animate({ "width": intEndWidth + "px", "left": intEndLeft + "px", "top": intEndTop + "px" }, 200, "linear", function() { jQuery(this) .find(".rh_options") .slideDown(500); } ) // Rating .find(".rh-stars") .mouseover(function(){ rhFotoInitRating(this,strAlbum); }); } /* file: rhflow/newsletter.js.php (mtime: 2012-01-14 11:57:54) */ function rhNewsletterBoxInit(name) { if (!name) { name = "newsletter"; } jQuery("#rh-"+name+"-add-form input[name='mail']").toggleVal({ populateFrom: "custom", text: "Deine E-Mail?" }); jQuery("#rh-"+name+"-add-form input[name='mail']").focus(function() { jQuery("#rh-"+name+"-add-box-name").show(200); }); jQuery("#rh-"+name+"-add-form input[name='name']").toggleVal({ populateFrom: "custom", text: "Dein Name?" }); jQuery("#rh-"+name+"-add-form input[name='hsv']").toggleVal({ populateFrom: "custom", text: "Dein Verein?" }); } function rhNewsletterAdd(name) { if (!name) { name = "newsletter"; } rhShowWait("rh-"+name+"-add-form"); jQuery("#rh-"+name+"-add-form input[type=\"text\"]").each(function() { if(jQuery(this).val() == jQuery(this).data("defText")) { jQuery(this).val(""); } }); var emailval = jQuery("#rh-"+name+"-add-form input[name=\"mail\"]").val(); var nameval = jQuery("#rh-"+name+"-add-form input[name=\"name\"]").val(); var hsvval = jQuery("#rh-"+name+"-add-form input[name=\"hsv\"]").val(); var url = "/newsletter/add"; url+= "?rhflow_session="+jQuery("#rhflow_session").html(); jQuery("#rh-"+name+"-add-mail-result").hide(); curr_newsletterbox = name; jQuery.get( url, { email: emailval, name: nameval, hsv: hsvval }, function(data) { rhHideWait("rh-"+curr_newsletterbox+"-add-form"); jQuery("#rh-"+curr_newsletterbox+"-add-mail-result").html(data).show(200); if (data.match(/Vielen Dank/)) { jQuery("#rh-"+curr_newsletterbox+"-add-form").hide(200); } } ) } /* file: rhflow/comment.js.php (mtime: 2012-01-14 11:57:54) */ function rhShowFotoCommentsDialog(album, file) { jQuery("#rh-dialog-modal").remove(); var url = "/comment/getFotoComments?album=" + escape(album) + "&file=" + escape(file); url+= "&rhflow_session="+jQuery("#rhflow_session").html(); var dialogopts = { width: 600, height: 500, modal: true, title: "Kommentare zu " + file }; jQuery("
    ").dialog(dialogopts); rhShowWait("rh-dialog-modal"); jQuery.get(url, function (data) { rhHideWait("rh-dialog-modal"); jQuery("#rh-dialog-modal").html(data); }); } function rhSubmitFotoCommentsDialog(info_out,form_cont) { rhShowWait(form_cont); var $url = "/comment/addFotoComment"; var $data = "album=" + escape(jQuery("input#album").val()) + "&file=" + escape(jQuery("input#file").val()) + "&comment=" + escape(jQuery("textarea#comment").val()) + "&name=" + escape(jQuery("input#name").val()) + "&email=" + escape(jQuery("input#email").val()) $data+= "&rhflow_session="+jQuery("#rhflow_session").html(); jQuery.ajax({ type: "POST", url: $url, data: $data, success: function(data) { if (data.match(/successfull/i)) { jQuery("#" + form_cont).remove(); jQuery("#" + info_out).html(data); } else { rhHideWait(form_cont); jQuery("#" + info_out).html(data); } } }); } /* file: rhflow/widget.js.php (mtime: 2012-01-14 11:57:55) */ var rhflow_styles_loaded = false; function rhflow_widget(pictures) { //jQuery(function(){ rhflow_widget_loader(pictures); //}); } function rhflow_widget_loader(pictures) { var output = rhflow_config.output || "rhflow_output"; var width = rhflow_config.width || 500; var height = rhflow_config.height || 200; if (jQuery("#" + output).length == 0) { document.write("
    "); } // iframe einbinden //jQuery("#" + output).html(""); jQuery("#" + output).html(""); jQuery("body").append( "
    " + "" + "" + "" //+ "" //+ "" + "
    "); document.forms[output + "_form"].submit(); } function rhflow_widget_alt(pictures) { if (!rhflow_styles_loaded) { document.write(""); rhflow_styles_loaded = true; } var width = rhflow_config.width || 0; var height = rhflow_config.height || 0; var pic_width = rhflow_config.pic_width || 108; var pic_height = rhflow_config.pic_height || 108; var theme = rhflow_config.theme || {}; var features = rhflow_config.features || { scrollbar: true, rating: false, comments: false, tooltips: true }; var output = rhflow_config.output || "rhflow_output"; if (jQuery("#" + output).length == 0) { document.write("
    "); } if (theme.body) { if (theme.body.background) { jQuery("#" + output).css("background-color", theme.body.background); } if (theme.body.color) { jQuery("#" + output).css("color", theme.body.color); } if (theme.body.border) { jQuery("#" + output).css({ "border": "1px solid " + theme.body.border, "borderRadius": "5px", "-moz-border-radius": "5px", "-webkit-border-radius": "5px" }); } } if (height > 0) { jQuery("#" + output).css("height", height + "px"); } if (width > 0) { jQuery("#" + output).css("width", width + "px"); } if (features.scrollbar && height > 0) { jQuery("#" + output).css("overflow", "auto"); } rhShowWait(output, "lade Bilder..."); var requestdata = { 'config': { 'width': pic_width, 'height': pic_height }, 'pictures': pictures, 'serverurl': window.location.host }; var fullurl = 'http://rh-flow.de/widget/getAlbumJson'; jQuery.ajax({ dataType: 'jsonp', jsonp: 'jsonp_callback', data: requestdata, url: fullurl, success: rhflow_response }); } function rhflow_response(data) { var version = rhflow_config.version || 1; var pic_width = rhflow_config.pic_width || 108; var pic_height = rhflow_config.pic_height || 108; var theme = rhflow_config.theme || {}; var imgtype = (theme.picture && theme.picture.type ? theme.picture.type : "cutted"); var features = rhflow_config.features || { scrollbar: true, rating: false, comments: false, tooltips: true }; //var pictures = rhflow_config.pictures || {}; var output = rhflow_config.output || "rhflow_output"; var title = rhflow_config.title || ""; //console.log(data.pictures); rhHideWait(output); var out = jQuery("#" + output); jQuery(out).html(""); jQuery(out).append('
    ' + '
    ' + title + '
    ' + '
    powered by rh-flow.de
    ' + '

    ' + '
    '); var albums = []; for (var num in data.pictures) { var pic = data.pictures[num]; //console.log(pic); var html = ''; jQuery(out).append(html); } // jQuery(out).append('zum Album ' + pic.album + ' bei rh-flow.de'); jQuery(out).append('

    '); rhUpdateTooltips(); } /* file: superfish/hoverIntent.js (mtime: 2012-01-14 11:57:56) */ (function($){ /* hoverIntent by Brian Cherne */ $.fn.hoverIntent = function(f,g) { // default configuration options var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; // override configuration options with user supplied object cfg = $.extend(cfg, g ? { over: f, out: g } : f ); // instantiate variables // cX, cY = current X and Y position of mouse, updated by mousemove event // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval var cX, cY, pX, pY; // A private function for getting mouse position var track = function(ev) { cX = ev.pageX; cY = ev.pageY; }; // A private function for comparing current and previous mouse position var compare = function(ev,ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); // compare mouse positions to see if they've crossed the threshold if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { $(ob).unbind("mousemove",track); // set hoverIntent state to true (so mouseOut can be called) ob.hoverIntent_s = 1; return cfg.over.apply(ob,[ev]); } else { // set previous coordinates for next time pX = cX; pY = cY; // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); } }; // A private function for delaying the mouseOut function var delay = function(ev,ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob,[ev]); }; // A private function for handling mouse 'hovering' var handleHover = function(e) { // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } } if ( p == this ) { return false; } // copy objects to be passed into t (required for event object to be passed in IE) var ev = jQuery.extend({},e); var ob = this; // cancel hoverIntent timer if it exists if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } // else e.type == "onmouseover" if (e.type == "mouseover") { // set "previous" X and Y position based on initial entry point pX = ev.pageX; pY = ev.pageY; // update "current" X and Y position based on mousemove $(ob).bind("mousemove",track); // start polling interval (self-calling timeout) to compare mouse coordinates over time if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} // else e.type == "onmouseout" } else { // unbind expensive mousemove event $(ob).unbind("mousemove",track); // if hoverIntent state is true, then call the mouseOut function after the specified delay if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} } }; // bind the function to the two event listeners return this.mouseover(handleHover).mouseout(handleHover); }; })(jQuery); /* file: superfish/superfish.js (mtime: 2012-01-14 11:57:56) */ /* * Superfish v1.4.8 - jQuery menu widget * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt */ ;(function($){ $.fn.superfish = function(op){ var sf = $.fn.superfish, c = sf.c, $arrow = $([' »'].join('')), over = function(){ var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function(){ var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} },o.delay); }, getMenu = function($menu){ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { if (o.autoArrows) addArrow( $('>a:first-child',this) ); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a = $('a',this); $a.each(function(i){ var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); }); o.onInit.call(this); }).each(function() { var menuClasses = [c.menuClass]; if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf = $.fn.superfish; sf.o = []; sf.op = {}; sf.IE7fix = function(){ var o = sf.op; if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off'); }; sf.c = { bcClass : 'sf-breadcrumb', menuClass : 'sf-js-enabled', anchorClass : 'sf-with-ul', arrowClass : 'sf-sub-indicator', shadowClass : 'sf-shadow' }; sf.defaults = { hoverClass : 'sfHover', pathClass : 'overideThisToUse', pathLevels : 1, delay : 800, animation : {opacity:'show'}, speed : 'normal', autoArrows : true, dropShadows : true, disableHI : false, // true disables hoverIntent detection onInit : function(){}, // callback functions onBeforeShow: function(){}, onShow : function(){}, onHide : function(){} }; $.fn.extend({ hideSuperfishUl : function(){ var o = sf.op, not = (o.retainPath===true) ? o.$path : ''; o.retainPath = false; var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility','hidden'); o.onHide.call($ul); return this; }, showSuperfishUl : function(){ var o = sf.op, sh = sf.c.shadowClass+'-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; } }); })(jQuery); /* file: jquery/jquery.MetaData.js (mtime: 2012-01-14 11:57:46) */ /* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id$ * */ /** * Sets the type of metadata to use. Metadata is encoded in JSON, and each property * in the JSON will become a property of the element itself. * * There are three supported types of metadata storage: * * attr: Inside an attribute. The name parameter indicates *which* attribute. * * class: Inside the class attribute, wrapped in curly braces: { } * * elem: Inside a child element (e.g. a script tag). The * name parameter indicates *which* element. * * The metadata for an element is loaded the first time the element is accessed via jQuery. * * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements * matched by expr, then redefine the metadata type and run another $(expr) for other elements. * * @name $.metadata.setType * * @example

    This is a p

    * @before $.metadata.setType("class") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from the class attribute * * @example

    This is a p

    * @before $.metadata.setType("attr", "data") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a "data" attribute * * @example

    This is a p

    * @before $.metadata.setType("elem", "script") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a nested script element * * @param String type The encoding type * @param String name The name of the attribute to be used to get metadata (optional) * @cat Plugins/Metadata * @descr Sets the type of encoding to be used when loading metadata for the first time * @type undefined * @see metadata() */ (function($) { $.extend({ metadata : { defaults : { type: 'class', name: 'metadata', cre: /({.*})/, single: 'metadata' }, setType: function( type, name ){ this.defaults.type = type; this.defaults.name = name; }, get: function( elem, opts ){ var settings = $.extend({},this.defaults,opts); // check for empty string in single property if ( !settings.single.length ) settings.single = 'metadata'; var data = $.data(elem, settings.single); // returned cached data if it already exists if ( data ) return data; data = "{}"; if ( settings.type == "class" ) { var m = settings.cre.exec( elem.className ); if ( m ) data = m[1]; } else if ( settings.type == "elem" ) { if( !elem.getElementsByTagName ) return; var e = elem.getElementsByTagName(settings.name); if ( e.length ) data = $.trim(e[0].innerHTML); } else if ( elem.getAttribute != undefined ) { var attr = elem.getAttribute( settings.name ); if ( attr ) data = attr; } if ( data.indexOf( '{' ) <0 ) data = "{" + data + "}"; data = eval("(" + data + ")"); $.data( elem, settings.single, data ); return data; } } }); /** * Returns the metadata object for the first member of the jQuery object. * * @name metadata * @descr Returns element's metadata object * @param Object opts An object contianing settings to override the defaults * @type jQuery * @cat Plugins/Metadata */ $.fn.metadata = function( opts ){ return $.metadata.get( this[0], opts ); }; })(jQuery); /* file: jquery/jquery.rating.pack.js (mtime: 2012-01-14 11:57:50) */ /* ### jQuery Star Rating Plugin v3.13 - 2009-03-26 ### * Home: http://www.fyneworks.com/jquery/star-rating/ * Code: http://code.google.com/p/jquery-star-rating-plugin/ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html ### */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';5(29.1j)(7($){5($.1L.1J)1I{1t.1H("1K",J,H)}1M(e){};$.n.3=7(i){5(4.Q==0)k 4;5(A I[0]==\'1h\'){5(4.Q>1){8 j=I;k 4.W(7(){$.n.3.y($(4),j)})};$.n.3[I[0]].y(4,$.1T(I).1U(1)||[]);k 4};8 i=$.12({},$.n.3.1s,i||{});$.n.3.K++;4.2a(\'.9-3-1f\').o(\'9-3-1f\').W(7(){8 a,l=$(4);8 b=(4.23||\'21-3\').1v(/\\[|\\]/g,\'Z\').1v(/^\\Z+|\\Z+$/g,\'\');8 c=$(4.1X||1t.1W);8 d=c.6(\'3\');5(!d||d.18!=$.n.3.K)d={z:0,18:$.n.3.K};8 e=d[b];5(e)a=e.6(\'3\');5(e&&a)a.z++;x{a=$.12({},i||{},($.1b?l.1b():($.1S?l.6():s))||{},{z:0,F:[],v:[]});a.w=d.z++;e=$(\'<1R V="9-3-1Q"/>\');l.1P(e);e.o(\'3-15-T-17\');5(l.S(\'R\'))a.m=H;e.1c(a.E=$(\'

    \'+a.1d+\'

    \').1g(7(){$(4).3(\'O\');$(4).o(\'9-3-N\')}).1i(7(){$(4).3(\'u\');$(4).G(\'9-3-N\')}).1l(7(){$(4).3(\'r\')}).6(\'3\',a))};8 f=$(\'

    \'+4.1p+\'

    \');e.1c(f);5(4.11)f.S(\'11\',4.11);5(4.1r)f.o(4.1r);5(a.1F)a.t=2;5(A a.t==\'1u\'&&a.t>0){8 g=($.n.10?f.10():0)||a.1w;8 h=(a.z%a.t),Y=1y.1z(g/a.t);f.10(Y).1A(\'a\').1B({\'1C-1D\':\'-\'+(h*Y)+\'1E\'})};5(a.m)f.o(\'9-3-1o\');x f.o(\'9-3-1G\').1g(7(){$(4).3(\'1n\');$(4).3(\'D\')}).1i(7(){$(4).3(\'u\');$(4).3(\'C\')}).1l(7(){$(4).3(\'r\')});5(4.L)a.p=f;l.1q();l.1N(7(){$(4).3(\'r\')});f.6(\'3.l\',l.6(\'3.9\',f));a.F[a.F.Q]=f[0];a.v[a.v.Q]=l[0];a.q=d[b]=e;a.1O=c;l.6(\'3\',a);e.6(\'3\',a);f.6(\'3\',a);c.6(\'3\',d)});$(\'.3-15-T-17\').3(\'u\').G(\'3-15-T-17\');k 4};$.12($.n.3,{K:0,D:7(){8 a=4.6(\'3\');5(!a)k 4;5(!a.D)k 4;8 b=$(4).6(\'3.l\')||$(4.U==\'13\'?4:s);5(a.D)a.D.y(b[0],[b.M(),$(\'a\',b.6(\'3.9\'))[0]])},C:7(){8 a=4.6(\'3\');5(!a)k 4;5(!a.C)k 4;8 b=$(4).6(\'3.l\')||$(4.U==\'13\'?4:s);5(a.C)a.C.y(b[0],[b.M(),$(\'a\',b.6(\'3.9\'))[0]])},1n:7(){8 a=4.6(\'3\');5(!a)k 4;5(a.m)k;4.3(\'O\');4.1a().19().X(\'.q-\'+a.w).o(\'9-3-N\')},O:7(){8 a=4.6(\'3\');5(!a)k 4;5(a.m)k;a.q.1V().X(\'.q-\'+a.w).G(\'9-3-1k\').G(\'9-3-N\')},u:7(){8 a=4.6(\'3\');5(!a)k 4;4.3(\'O\');5(a.p){a.p.6(\'3.l\').S(\'L\',\'L\');a.p.1a().19().X(\'.q-\'+a.w).o(\'9-3-1k\')}x $(a.v).1m(\'L\');a.E[a.m||a.1Y?\'1q\':\'1Z\']();4.20()[a.m?\'o\':\'G\'](\'9-3-1o\')},r:7(a,b){8 c=4.6(\'3\');5(!c)k 4;5(c.m)k;c.p=s;5(A a!=\'B\'){5(A a==\'1u\')k $(c.F[a]).3(\'r\',B,b);5(A a==\'1h\')$.W(c.F,7(){5($(4).6(\'3.l\').M()==a)$(4).3(\'r\',B,b)})}x c.p=4[0].U==\'13\'?4.6(\'3.9\'):(4.22(\'.q-\'+c.w)?4:s);4.6(\'3\',c);4.3(\'u\');8 d=$(c.p?c.p.6(\'3.l\'):s);5((b||b==B)&&c.1e)c.1e.y(d[0],[d.M(),$(\'a\',c.p)[0]])},m:7(a,b){8 c=4.6(\'3\');5(!c)k 4;c.m=a||a==B?H:J;5(b)$(c.v).S("R","R");x $(c.v).1m("R");4.6(\'3\',c);4.3(\'u\')},1x:7(){4.3(\'m\',H,H)},24:7(){4.3(\'m\',J,J)}});$.n.3.1s={E:\'25 26\',1d:\'\',t:0,1w:16};$(7(){$(\'l[27=28].9\').3()})})(1j);',62,135,'|||rating|this|if|data|function|var|star|||||||||||return|input|readOnly|fn|addClass|current|rater|select|null|split|draw|inputs|serial|else|apply|count|typeof|undefined|blur|focus|cancel|stars|removeClass|true|arguments|false|calls|checked|val|hover|drain|div|length|disabled|attr|be|tagName|class|each|filter|spw|_|width|id|extend|INPUT|title|to||drawn|call|andSelf|prevAll|metadata|append|cancelValue|callback|applied|mouseover|string|mouseout|jQuery|on|click|removeAttr|fill|readonly|value|hide|className|options|document|number|replace|starWidth|disable|Math|floor|find|css|margin|left|px|half|live|execCommand|try|msie|BackgroundImageCache|browser|catch|change|context|before|control|span|meta|makeArray|slice|children|body|form|required|show|siblings|unnamed|is|name|enable|Cancel|Rating|type|radio|window|not'.split('|'),0,{})); /* file: jquery/jquery.lightbox.js (mtime: 2012-01-14 11:57:44) */ /** * jQuery lightBox plugin * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/) * and adapted to me for use like a plugin from jQuery. * @name jquery-lightbox-0.5.js * @author Leandro Vieira Pinho - http://leandrovieira.com * @version 0.5 * @date April 11, 2008 * @category jQuery plugin * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com) * @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin */ // Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias (function($) { /** * $ is an alias to jQuery object * */ $.fn.lightBox = function(settings) { // Settings to configure the jQuery lightBox plugin how you like settings = jQuery.extend({ // Configuration related to overlay overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color. overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9 // Configuration related to navigation fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface. // Configuration related to images imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn imageBlank: 'images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel) // Configuration related to container image box containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default. // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts. txtImage: 'Image', // (string) Specify text "Image" txtOf: 'of', // (string) Specify text "of" // Configuration related to keyboard navigation keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to. keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image keyToNext: 'n', // (string) (n = next) Letter to show the next image. // Don´t alter these variables in any way imageArray: [], activeImage: 0, checkTarget: 0, callbackOnShowImageData: 0, },settings); // Caching the jQuery object with all elements matched var jQueryMatchedObj = this; // This, in this context, refer to jQuery object /** * Initializing the plugin calling the start function * * @return boolean false */ function _initialize() { _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked return false; // Avoid the browser following the link } /** * Start the jQuery lightBox plugin * * @param object objClicked The object (link) whick the user have clicked * @param object jQueryMatchedObj The jQuery object with all elements matched */ function _start(objClicked,jQueryMatchedObj) { var strTarget = objClicked.getAttribute('target'); // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay. $('embed, object, select').css({ 'visibility' : 'hidden' }); // Call the function to create the markup structure; style some elements; assign events in some elements. _set_interface(); // Unset total images in imageArray settings.imageArray.length = 0; // Unset image active information settings.activeImage = 0; // We have an image set? Or just an image? Let´s see it. if ( jQueryMatchedObj.length == 1 ) { settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title'),objClicked)); } else { // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references for ( var i = 0; i < jQueryMatchedObj.length; i++ ) { if (!settings.checkTarget || jQueryMatchedObj[i].getAttribute('target') == strTarget ) { //console.log('remember: '+jQuery(jQueryMatchedObj[i]).data('remember')); settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title'),jQueryMatchedObj[i])); } } } while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) { settings.activeImage++; } // Call the function that prepares image exibition _set_image_to_view(); } /** * Create the jQuery lightBox plugin interface * * The HTML markup will be like that:
    * */ function _set_interface() { // Apply the HTML markup into body tag $('body').append( '
    ' + '
    ' + '' // lightbox-container-image-data-box + '' // lightbox-container-image-box + '
    ' // jquery-lightbox ); // Get page sizes var arrPageSizes = ___getPageSize(); // Style overlay and show it $('#jquery-overlay').css({ backgroundColor: settings.overlayBgColor, opacity: settings.overlayOpacity, width: arrPageSizes[0], height: arrPageSizes[1] }).fadeIn(); // Get page scroll var arrPageScroll = ___getPageScroll(); // Calculate top and left offset for the jquery-lightbox div object and show it $('#jquery-lightbox').css({ top: arrPageScroll[1] + (arrPageSizes[3] / 10), left: arrPageScroll[0] }).show(); // Assigning click events in elements to close overlay //$('#jquery-overlay,#jquery-lightbox').click(function() { $('#jquery-overlay').click(function() { _finish(); }); // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() { _finish(); return false; }); // If window was resized, calculate the new overlay dimensions $(window).resize(function() { // Get page sizes var arrPageSizes = ___getPageSize(); // Style overlay and show it $('#jquery-overlay').css({ width: arrPageSizes[0], height: arrPageSizes[1] }); // Get page scroll var arrPageScroll = ___getPageScroll(); // Calculate top and left offset for the jquery-lightbox div object and show it $('#jquery-lightbox').css({ top: arrPageScroll[1] + (arrPageSizes[3] / 10), left: arrPageScroll[0] }); }); } /** * Prepares image exibition; doing a image´s preloader to calculate it´s size * */ function _set_image_to_view() { // show the loading // Show the loading $('#lightbox-loading').show(); if ( settings.fixedNavigation ) { $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide(); } else { // Hide some elements $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext'/*,#lightbox-container-image-data-box*/+',#lightbox-image-details-currentNumber').hide(); } // Image preload process var objImagePreloader = new Image(); objImagePreloader.onload = function() { $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]); // Perfomance an effect in the image container resizing it _resize_container_image_box(objImagePreloader.width,objImagePreloader.height); // clear onLoad, IE behaves irratically with animated gifs otherwise objImagePreloader.onload=function(){}; }; objImagePreloader.src = settings.imageArray[settings.activeImage][0]; }; /** * Perfomance an effect in the image container resizing it * * @param integer intImageWidth The image´s width that will be showed * @param integer intImageHeight The image´s height that will be showed */ function _resize_container_image_box(intImageWidth,intImageHeight) { // Get current width and height var intCurrentWidth = $('#lightbox-container-image-box').width(); var intCurrentHeight = $('#lightbox-container-image-box').height(); // Get the width and height of the selected image plus the padding var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value // Diferences var intDiffW = intCurrentWidth - intWidth; var intDiffH = intCurrentHeight - intHeight; // Perfomance the effect $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); }); if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) { if ( $.browser.msie ) { ___pause(250); } else { ___pause(100); } } $('#lightbox-container-image-data-box').css({ width: intImageWidth }); $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) }); }; /** * Show the prepared image * */ function _show_image() { $('#lightbox-loading').hide(); $('#lightbox-image').fadeIn(function() { _show_image_data(); _set_navigation(); }); _preload_neighbor_images(); }; /** * Show the image information * */ function _show_image_data() { $('#lightbox-container-image-data-box').show(); //slideDown('fast'); // callback for additional content if (settings.callbackOnShowImageData && typeof settings.callbackOnShowImageData == "function" && settings.imageArray[settings.activeImage][2] ) { settings.callbackOnShowImageData(settings.imageArray[settings.activeImage][2]); } $('#lightbox-image-details-caption').hide(); if ( settings.imageArray[settings.activeImage][1] ) { $('#lightbox-image-details-caption').html('no. '+settings.imageArray[settings.activeImage][1]).show(); } // If we have a image set, display 'Image X of X' if ( settings.imageArray.length > 1 ) { $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show(); } } /** * Display the button navigations * */ function _set_navigation() { $('#lightbox-nav').show(); // Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just. $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' }); // Show the prev button, if not the first image in set if ( settings.activeImage != 0 ) { if ( settings.fixedNavigation ) { $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }) .unbind() .bind('click',function() { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); return false; }); } else { // Show the images button for Next buttons $('#lightbox-nav-btnPrev').unbind().hover(function() { $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }); },function() { $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' }); }).show().bind('click',function() { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); return false; }); } } // Show the next button, if not the last image in set if ( settings.activeImage != ( settings.imageArray.length -1 ) ) { if ( settings.fixedNavigation ) { $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }) .unbind() .bind('click',function() { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); return false; }); } else { // Show the images button for Next buttons $('#lightbox-nav-btnNext').unbind().hover(function() { $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }); },function() { $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' }); }).show().bind('click',function() { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); return false; }); } } // Enable keyboard navigation _enable_keyboard_navigation(); } /** * Enable a support to keyboard navigation * */ function _enable_keyboard_navigation() { $(document).keydown(function(objEvent) { _keyboard_action(objEvent); }); } /** * Disable the support to keyboard navigation * */ function _disable_keyboard_navigation() { $(document).unbind(); } /** * Perform the keyboard actions * */ function _keyboard_action(objEvent) { // To ie if ( objEvent == null ) { keycode = event.keyCode; escapeKey = 27; // To Mozilla } else { keycode = objEvent.keyCode; escapeKey = objEvent.DOM_VK_ESCAPE; } // Get the key in lower case form key = String.fromCharCode(keycode).toLowerCase(); // Verify the keys to close the ligthBox if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) { _finish(); } // Verify the key to show the previous image if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) { // If we´re not showing the first image, call the previous if ( settings.activeImage != 0 ) { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); _disable_keyboard_navigation(); } } // Verify the key to show the next image if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) { // If we´re not showing the last image, call the next if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); _disable_keyboard_navigation(); } } } /** * Preload prev and next images being showed * */ function _preload_neighbor_images() { if ( (settings.imageArray.length -1) > settings.activeImage ) { objNext = new Image(); objNext.src = settings.imageArray[settings.activeImage + 1][0]; } if ( settings.activeImage > 0 ) { objPrev = new Image(); objPrev.src = settings.imageArray[settings.activeImage -1][0]; } } /** * Remove jQuery lightBox plugin HTML markup * */ function _finish() { $('#jquery-lightbox').remove(); $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); }); // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay. $('embed, object, select').css({ 'visibility' : 'visible' }); } /** / THIRD FUNCTION * getPageSize() by quirksmode.com * * @return Array Return an array with page width, height and window width, height */ function ___getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = xScroll; } else { pageWidth = windowWidth; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); return arrayPageSize; }; /** / THIRD FUNCTION * getPageScroll() by quirksmode.com * * @return Array Return an array with x,y page scroll values. */ function ___getPageScroll() { var xScroll, yScroll; if (self.pageYOffset) { yScroll = self.pageYOffset; xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict yScroll = document.documentElement.scrollTop; xScroll = document.documentElement.scrollLeft; } else if (document.body) {// all other Explorers yScroll = document.body.scrollTop; xScroll = document.body.scrollLeft; } arrayPageScroll = new Array(xScroll,yScroll); return arrayPageScroll; }; /** * Stop the code execution from a escified time in milisecond * */ function ___pause(ms) { var date = new Date(); curDate = null; do { var curDate = new Date(); } while ( curDate - date < ms); }; // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once return this.unbind('click').click(_initialize); }; })(jQuery); // Call and execute the function immediately passing the jQuery object /* file: colorpicker/colorpicker.js (mtime: 2012-01-14 11:56:48) */ /** * * Color picker * Author: Stefan Petre www.eyecon.ro * * Dual licensed under the MIT and GPL licenses * */ ;(function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '
    ', defaults = { eventName: 'click', onShow: function () {}, onBeforeShow: function(){}, onHide: function () {}, onChange: function () {}, onSubmit: function () {}, color: 'ff0000', livePreview: true, flat: false }, fillRGBFields = function (hsb, cal) { var rgb = HSBToRGB(hsb); $(cal).data('colorpicker').fields .eq(1).val(rgb.r).end() .eq(2).val(rgb.g).end() .eq(3).val(rgb.b).end(); }, fillHSBFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(4).val(hsb.h).end() .eq(5).val(hsb.s).end() .eq(6).val(hsb.b).end(); }, fillHexFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(0).val(HSBToHex(hsb)).end(); }, setSelector = function (hsb, cal) { $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); $(cal).data('colorpicker').selectorIndic.css({ left: parseInt(150 * hsb.s/100, 10), top: parseInt(150 * (100-hsb.b)/100, 10) }); }, setHue = function (hsb, cal) { $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); }, setCurrentColor = function (hsb, cal) { $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, setNewColor = function (hsb, cal) { $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, keyDown = function (ev) { var pressedKey = ev.charCode || ev.keyCode || -1; if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { return false; } var cal = $(this).parent().parent(); if (cal.data('colorpicker').livePreview === true) { change.apply(this); } }, change = function (ev) { var cal = $(this).parent().parent(), col; if (this.parentNode.className.indexOf('_hex') > 0) { cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); } else if (this.parentNode.className.indexOf('_hsb') > 0) { cal.data('colorpicker').color = col = fixHSB({ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) }); } else { cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) })); } if (ev) { fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); } setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); }, blur = function (ev) { var cal = $(this).parent().parent(); cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); }, focus = function () { charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); $(this).parent().addClass('colorpicker_focus'); }, downIncrement = function (ev) { var field = $(this).parent().find('input').focus(); var current = { el: $(this).parent().addClass('colorpicker_slider'), max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), y: ev.pageY, field: field, val: parseInt(field.val(), 10), preview: $(this).parent().parent().data('colorpicker').livePreview }; $(document).bind('mouseup', current, upIncrement); $(document).bind('mousemove', current, moveIncrement); }, moveIncrement = function (ev) { ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); if (ev.data.preview) { change.apply(ev.data.field.get(0), [true]); } return false; }, upIncrement = function (ev) { change.apply(ev.data.field.get(0), [true]); ev.data.el.removeClass('colorpicker_slider').find('input').focus(); $(document).unbind('mouseup', upIncrement); $(document).unbind('mousemove', moveIncrement); return false; }, downHue = function (ev) { var current = { cal: $(this).parent(), y: $(this).offset().top }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upHue); $(document).bind('mousemove', current, moveHue); }, moveHue = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(4) .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upHue = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upHue); $(document).unbind('mousemove', moveHue); return false; }, downSelector = function (ev) { var current = { cal: $(this).parent(), pos: $(this).offset() }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upSelector); $(document).bind('mousemove', current, moveSelector); }, moveSelector = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(6) .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) .end() .eq(5) .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upSelector = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upSelector); $(document).unbind('mousemove', moveSelector); return false; }, enterSubmit = function (ev) { $(this).addClass('colorpicker_focus'); }, leaveSubmit = function (ev) { $(this).removeClass('colorpicker_focus'); }, clickSubmit = function (ev) { var cal = $(this).parent(); var col = cal.data('colorpicker').color; cal.data('colorpicker').origColor = col; setCurrentColor(col, cal.get(0)); cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); }, show = function (ev) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); var pos = $(this).offset(); var viewPort = getViewport(); var top = pos.top + this.offsetHeight; var left = pos.left; if (top + 176 > viewPort.t + viewPort.h) { top -= this.offsetHeight + 176; } if (left + 356 > viewPort.l + viewPort.w) { left -= 356; } cal.css({left: left + 'px', top: top + 'px'}); if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { cal.show(); } $(document).bind('mousedown', {cal: cal}, hide); return false; }, hide = function (ev) { if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { ev.data.cal.hide(); } $(document).unbind('mousedown', hide); } }, isChildOf = function(parentEl, el, container) { if (parentEl == el) { return true; } if (parentEl.contains) { return parentEl.contains(el); } if ( parentEl.compareDocumentPosition ) { return !!(parentEl.compareDocumentPosition(el) & 16); } var prEl = el.parentNode; while(prEl && prEl != container) { if (prEl == parentEl) return true; prEl = prEl.parentNode; } return false; }, getViewport = function () { var m = document.compatMode == 'CSS1Compat'; return { l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) }; }, fixHSB = function (hsb) { return { h: Math.min(360, Math.max(0, hsb.h)), s: Math.min(100, Math.max(0, hsb.s)), b: Math.min(100, Math.max(0, hsb.b)) }; }, fixRGB = function (rgb) { return { r: Math.min(255, Math.max(0, rgb.r)), g: Math.min(255, Math.max(0, rgb.g)), b: Math.min(255, Math.max(0, rgb.b)) }; }, fixHex = function (hex) { var len = 6 - hex.length; if (len > 0) { var o = []; for (var i=0; i -1) ? hex.substring(1) : hex), 16); return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; }, HexToHSB = function (hex) { return RGBToHSB(HexToRGB(hex)); }, RGBToHSB = function (rgb) { var hsb = { h: 0, s: 0, b: 0 }; var min = Math.min(rgb.r, rgb.g, rgb.b); var max = Math.max(rgb.r, rgb.g, rgb.b); var delta = max - min; hsb.b = max; if (max != 0) { } hsb.s = max != 0 ? 255 * delta / max : 0; if (hsb.s != 0) { if (rgb.r == max) { hsb.h = (rgb.g - rgb.b) / delta; } else if (rgb.g == max) { hsb.h = 2 + (rgb.b - rgb.r) / delta; } else { hsb.h = 4 + (rgb.r - rgb.g) / delta; } } else { hsb.h = -1; } hsb.h *= 60; if (hsb.h < 0) { hsb.h += 360; } hsb.s *= 100/255; hsb.b *= 100/255; return hsb; }, HSBToRGB = function (hsb) { var rgb = {}; var h = Math.round(hsb.h); var s = Math.round(hsb.s*255/100); var v = Math.round(hsb.b*255/100); if(s == 0) { rgb.r = rgb.g = rgb.b = v; } else { var t1 = v; var t2 = (255-s)*v/255; var t3 = (t1-t2)*(h%60)/60; if(h==360) h = 0; if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} else {rgb.r=0; rgb.g=0; rgb.b=0} } return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; }, RGBToHex = function (rgb) { var hex = [ rgb.r.toString(16), rgb.g.toString(16), rgb.b.toString(16) ]; $.each(hex, function (nr, val) { if (val.length == 1) { hex[nr] = '0' + val; } }); return hex.join(''); }, HSBToHex = function (hsb) { return RGBToHex(HSBToRGB(hsb)); }, restoreOriginal = function () { var cal = $(this).parent(); var col = cal.data('colorpicker').origColor; cal.data('colorpicker').color = col; fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); }; return { init: function (opt) { opt = $.extend({}, defaults, opt||{}); if (typeof opt.color == 'string') { opt.color = HexToHSB(opt.color); } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { opt.color = RGBToHSB(opt.color); } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { opt.color = fixHSB(opt.color); } else { return this; } return this.each(function () { if (!$(this).data('colorpickerId')) { var options = $.extend({}, opt); options.origColor = opt.color; var id = 'collorpicker_' + parseInt(Math.random() * 1000); $(this).data('colorpickerId', id); var cal = $(tpl).attr('id', id); if (options.flat) { cal.appendTo(this).show(); } else { cal.appendTo(document.body); } options.fields = cal .find('input') .bind('keyup', keyDown) .bind('change', change) .bind('blur', blur) .bind('focus', focus); cal .find('span').bind('mousedown', downIncrement).end() .find('>div.colorpicker_current_color').bind('click', restoreOriginal); options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); options.selectorIndic = options.selector.find('div div'); options.el = this; options.hue = cal.find('div.colorpicker_hue div'); cal.find('div.colorpicker_hue').bind('mousedown', downHue); options.newColor = cal.find('div.colorpicker_new_color'); options.currentColor = cal.find('div.colorpicker_current_color'); cal.data('colorpicker', options); cal.find('div.colorpicker_submit') .bind('mouseenter', enterSubmit) .bind('mouseleave', leaveSubmit) .bind('click', clickSubmit); fillRGBFields(options.color, cal.get(0)); fillHSBFields(options.color, cal.get(0)); fillHexFields(options.color, cal.get(0)); setHue(options.color, cal.get(0)); setSelector(options.color, cal.get(0)); setCurrentColor(options.color, cal.get(0)); setNewColor(options.color, cal.get(0)); if (options.flat) { cal.css({ position: 'relative', display: 'block' }); } else { $(this).bind(options.eventName, show); } } }); }, showPicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { show.apply(this); } }); }, hidePicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { $('#' + $(this).data('colorpickerId')).hide(); } }); }, setColor: function(col) { if (typeof col == 'string') { col = HexToHSB(col); } else if (col.r != undefined && col.g != undefined && col.b != undefined) { col = RGBToHSB(col); } else if (col.h != undefined && col.s != undefined && col.b != undefined) { col = fixHSB(col); } else { return this; } return this.each(function(){ if ($(this).data('colorpickerId')) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').color = col; cal.data('colorpicker').origColor = col; fillRGBFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); setHue(col, cal.get(0)); setSelector(col, cal.get(0)); setCurrentColor(col, cal.get(0)); setNewColor(col, cal.get(0)); } }); } }; }(); $.fn.extend({ ColorPicker: ColorPicker.init, ColorPickerHide: ColorPicker.hidePicker, ColorPickerShow: ColorPicker.showPicker, ColorPickerSetColor: ColorPicker.setColor }); })(jQuery); /* file: colorpicker/eye.js (mtime: 2012-01-14 11:56:48) */ /** * * Zoomimage * Author: Stefan Petre www.eyecon.ro * */ ;(function($){ var EYE = window.EYE = function() { var _registered = { init: [] }; return { init: function() { $.each(_registered.init, function(nr, fn){ fn.call(); }); }, extend: function(prop) { for (var i in prop) { if (prop[i] != undefined) { this[i] = prop[i]; } } }, register: function(fn, type) { if (!_registered[type]) { _registered[type] = []; } _registered[type].push(fn); } }; }(); $(EYE.init); })(jQuery); /* file: colorpicker/utils.js (mtime: 2012-01-14 11:56:49) */ /** * * Utilities * Author: Stefan Petre www.eyecon.ro * */ ;(function($) { EYE.extend({ getPosition : function(e, forceIt) { var x = 0; var y = 0; var es = e.style; var restoreStyles = false; if (forceIt && jQuery.curCSS(e,'display') == 'none') { var oldVisibility = es.visibility; var oldPosition = es.position; restoreStyles = true; es.visibility = 'hidden'; es.display = 'block'; es.position = 'absolute'; } var el = e; if (el.getBoundingClientRect) { // IE var box = el.getBoundingClientRect(); x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2; y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2; } else { x = el.offsetLeft; y = el.offsetTop; el = el.offsetParent; if (e != el) { while (el) { x += el.offsetLeft; y += el.offsetTop; el = el.offsetParent; } } if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) { x -= document.body.offsetLeft; y -= document.body.offsetTop; } el = e.parentNode; while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML') { if (jQuery.curCSS(el, 'display') != 'inline') { x -= el.scrollLeft; y -= el.scrollTop; } el = el.parentNode; } } if (restoreStyles == true) { es.display = 'none'; es.position = oldPosition; es.visibility = oldVisibility; } return {x:x, y:y}; }, getSize : function(e) { var w = parseInt(jQuery.curCSS(e,'width'), 10); var h = parseInt(jQuery.curCSS(e,'height'), 10); var wb = 0; var hb = 0; if (jQuery.curCSS(e, 'display') != 'none') { wb = e.offsetWidth; hb = e.offsetHeight; } else { var es = e.style; var oldVisibility = es.visibility; var oldPosition = es.position; es.visibility = 'hidden'; es.display = 'block'; es.position = 'absolute'; wb = e.offsetWidth; hb = e.offsetHeight; es.display = 'none'; es.position = oldPosition; es.visibility = oldVisibility; } return {w:w, h:h, wb:wb, hb:hb}; }, getClient : function(e) { var h, w; if (e) { w = e.clientWidth; h = e.clientHeight; } else { var de = document.documentElement; w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; } return {w:w,h:h}; }, getScroll : function (e) { var t=0, l=0, w=0, h=0, iw=0, ih=0; if (e && e.nodeName.toLowerCase() != 'body') { t = e.scrollTop; l = e.scrollLeft; w = e.scrollWidth; h = e.scrollHeight; } else { if (document.documentElement) { t = document.documentElement.scrollTop; l = document.documentElement.scrollLeft; w = document.documentElement.scrollWidth; h = document.documentElement.scrollHeight; } else if (document.body) { t = document.body.scrollTop; l = document.body.scrollLeft; w = document.body.scrollWidth; h = document.body.scrollHeight; } if (typeof pageYOffset != 'undefined') { t = pageYOffset; l = pageXOffset; } iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0; ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0; } return { t: t, l: l, w: w, h: h, iw: iw, ih: ih }; }, getMargins : function(e, toInteger) { var t = jQuery.curCSS(e,'marginTop') || ''; var r = jQuery.curCSS(e,'marginRight') || ''; var b = jQuery.curCSS(e,'marginBottom') || ''; var l = jQuery.curCSS(e,'marginLeft') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10) }; else return {t: t, r: r, b: b, l: l}; }, getPadding : function(e, toInteger) { var t = jQuery.curCSS(e,'paddingTop') || ''; var r = jQuery.curCSS(e,'paddingRight') || ''; var b = jQuery.curCSS(e,'paddingBottom') || ''; var l = jQuery.curCSS(e,'paddingLeft') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10) }; else return {t: t, r: r, b: b, l: l}; }, getBorder : function(e, toInteger) { var t = jQuery.curCSS(e,'borderTopWidth') || ''; var r = jQuery.curCSS(e,'borderRightWidth') || ''; var b = jQuery.curCSS(e,'borderBottomWidth') || ''; var l = jQuery.curCSS(e,'borderLeftWidth') || ''; if (toInteger) return { t: parseInt(t, 10)||0, r: parseInt(r, 10)||0, b: parseInt(b, 10)||0, l: parseInt(l, 10)||0 }; else return {t: t, r: r, b: b, l: l}; }, traverseDOM : function(nodeEl, func) { func(nodeEl); nodeEl = nodeEl.firstChild; while(nodeEl){ EYE.traverseDOM(nodeEl, func); nodeEl = nodeEl.nextSibling; } }, getInnerWidth : function(el, scroll) { var offsetW = el.offsetWidth; return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth; }, getInnerHeight : function(el, scroll) { var offsetH = el.offsetHeight; return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight; }, getExtraWidth : function(el) { if($.boxModel) return (parseInt($.curCSS(el, 'paddingLeft'))||0) + (parseInt($.curCSS(el, 'paddingRight'))||0) + (parseInt($.curCSS(el, 'borderLeftWidth'))||0) + (parseInt($.curCSS(el, 'borderRightWidth'))||0); return 0; }, getExtraHeight : function(el) { if($.boxModel) return (parseInt($.curCSS(el, 'paddingTop'))||0) + (parseInt($.curCSS(el, 'paddingBottom'))||0) + (parseInt($.curCSS(el, 'borderTopWidth'))||0) + (parseInt($.curCSS(el, 'borderBottomWidth'))||0); return 0; }, isChildOf: function(parentEl, el, container) { if (parentEl == el) { return true; } if (!el || !el.nodeType || el.nodeType != 1) { return false; } if (parentEl.contains && !$.browser.safari) { return parentEl.contains(el); } if ( parentEl.compareDocumentPosition ) { return !!(parentEl.compareDocumentPosition(el) & 16); } var prEl = el.parentNode; while(prEl && prEl != container) { if (prEl == parentEl) return true; prEl = prEl.parentNode; } return false; }, centerEl : function(el, axis) { var clientScroll = EYE.getScroll(); var size = EYE.getSize(el); if (!axis || axis == 'vertically') $(el).css( { top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px' } ); if (!axis || axis == 'horizontally') $(el).css( { left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px' } ); } }); if (!$.easing.easeout) { $.easing.easeout = function(p, n, firstNum, delta, duration) { return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum; }; } })(jQuery); /* file: MD5.js (mtime: 2012-01-14 11:56:47) */ /* * md5.js 1.0b 27/06/96 * * Javascript implementation of the RSA Data Security, Inc. MD5 * Message-Digest Algorithm. * * Copyright (c) 1996 Henri Torgemane. All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * and its documentation for any purposes and without * fee is hereby granted provided that this copyright notice * appears in all copies. * * Of course, this soft is provided "as is" without express or implied * warranty of any kind. * * * Modified with german comments and some information about collisions. * (Ralf Mieke, ralf@miekenet.de, http://mieke.home.pages.de) */ function array(n) { for(i=0;i> 4 zu berechnen.. * Die nun verwendeten Funktionen sind zwar langsamer als die Originale, * aber sie funktionieren. */ function integer(n) { return n%(0xffffffff+1); } function shr(a,b) { a=integer(a); b=integer(b); if (a-0x80000000>=0) { a=a%0x80000000; a>>=b; a+=0x40000000>>(b-1); } else a>>=b; return a; } function shl1(a) { a=a%0x80000000; if (a&0x40000000==0x40000000) { a-=0x40000000; a*=2; a+=0x80000000; } else a*=2; return a; } function shl(a,b) { a=integer(a); b=integer(b); for (var i=0;i=0) if (t2>=0) return ((t1&t2)+0x80000000); else return (t1&b); else if (t2>=0) return (a&t2); else return (a&b); } function or(a,b) { a=integer(a); b=integer(b); var t1=(a-0x80000000); var t2=(b-0x80000000); if (t1>=0) if (t2>=0) return ((t1|t2)+0x80000000); else return ((t1|b)+0x80000000); else if (t2>=0) return ((a|t2)+0x80000000); else return (a|b); } function xor(a,b) { a=integer(a); b=integer(b); var t1=(a-0x80000000); var t2=(b-0x80000000); if (t1>=0) if (t2>=0) return (t1^t2); else return ((t1^b)+0x80000000); else if (t2>=0) return ((a^t2)+0x80000000); else return (a^b); } function not(a) { a=integer(a); return (0xffffffff-a); } /* Beginn des Algorithmus */ var state = new array(4); var count = new array(2); count[0] = 0; count[1] = 0; var buffer = new array(64); var transformBuffer = new array(16); var digestBits = new array(16); var S11 = 7; var S12 = 12; var S13 = 17; var S14 = 22; var S21 = 5; var S22 = 9; var S23 = 14; var S24 = 20; var S31 = 4; var S32 = 11; var S33 = 16; var S34 = 23; var S41 = 6; var S42 = 10; var S43 = 15; var S44 = 21; function F(x,y,z) { return or(and(x,y),and(not(x),z)); } function G(x,y,z) { return or(and(x,z),and(y,not(z))); } function H(x,y,z) { return xor(xor(x,y),z); } function I(x,y,z) { return xor(y ,or(x , not(z))); } function rotateLeft(a,n) { return or(shl(a, n),(shr(a,(32 - n)))); } function FF(a,b,c,d,x,s,ac) { a = a+F(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function GG(a,b,c,d,x,s,ac) { a = a+G(b, c, d) +x + ac; a = rotateLeft(a, s); a = a+b; return a; } function HH(a,b,c,d,x,s,ac) { a = a+H(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function II(a,b,c,d,x,s,ac) { a = a+I(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function transform(buf,offset) { var a=0, b=0, c=0, d=0; var x = transformBuffer; a = state[0]; b = state[1]; c = state[2]; d = state[3]; for (i = 0; i < 16; i++) { x[i] = and(buf[i*4+offset],0xff); for (j = 1; j < 4; j++) { x[i]+=shl(and(buf[i*4+j+offset] ,0xff), j * 8); } } /* Runde 1 */ a = FF ( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ d = FF ( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ c = FF ( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ b = FF ( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ a = FF ( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ d = FF ( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ c = FF ( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ b = FF ( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ a = FF ( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ d = FF ( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ c = FF ( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ b = FF ( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ a = FF ( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ d = FF ( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ c = FF ( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ b = FF ( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ /* Runde 2 */ a = GG ( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ d = GG ( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ c = GG ( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ b = GG ( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ a = GG ( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ d = GG ( d, a, b, c, x[10], S22, 0x2441453); /* 22 */ c = GG ( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ b = GG ( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ a = GG ( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ d = GG ( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ c = GG ( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ b = GG ( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ a = GG ( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ d = GG ( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ c = GG ( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ b = GG ( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ /* Runde 3 */ a = HH ( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ d = HH ( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ c = HH ( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ b = HH ( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ a = HH ( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ d = HH ( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ c = HH ( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ b = HH ( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ a = HH ( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ d = HH ( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ c = HH ( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ b = HH ( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ a = HH ( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ d = HH ( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ c = HH ( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ b = HH ( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ /* Runde 4 */ a = II ( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ d = II ( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ c = II ( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ b = II ( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ a = II ( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ d = II ( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ c = II ( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ b = II ( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ a = II ( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ d = II ( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ c = II ( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ b = II ( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ a = II ( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ d = II ( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ c = II ( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ b = II ( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ state[0] +=a; state[1] +=b; state[2] +=c; state[3] +=d; } /* Mit der Initialisierung von Dobbertin: state[0] = 0x12ac2375; state[1] = 0x3b341042; state[2] = 0x5f62b97c; state[3] = 0x4ba763ed; gibt es eine Kollision: begin 644 Message1 M7MH=JO6_>MG!X?!51$)W,CXV!A"=(!AR71,TF$W()/MEHR%C4:G1R:Q"= ` end begin 644 Message2 M7MH=JO6_>MG!X?!51$)W,CXV!A"=(!AR71,TF$W()/MEHREC4:G1R:Q"= ` end */ function init() { count[0]=count[1] = 0; state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; for (i = 0; i < digestBits.length; i++) digestBits[i] = 0; } function update(b) { var index,i; index = and(shr(count[0],3) , 0x3f); if (count[0]<0xffffffff-7) count[0] += 8; else { count[1]++; count[0]-=0xffffffff+1; count[0]+=8; } buffer[index] = and(b,0xff); if (index >= 63) { transform(buffer, 0); } } function finish() { var bits = new array(8); var padding; var i=0, index=0, padLen=0; for (i = 0; i < 4; i++) { bits[i] = and(shr(count[0],(i * 8)), 0xff); } for (i = 0; i < 4; i++) { bits[i+4]=and(shr(count[1],(i * 8)), 0xff); } index = and(shr(count[0], 3) ,0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); padding = new array(64); padding[0] = 0x80; for (i=0;i?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ "[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; function MD5(nachricht) { var l,s,k,ka,kb,kc,kd; init(); for (k=0;k