﻿jQuery.expr[":"].regex = function(g, d, c) { var h = c[3].split(","), b = /^(data|css):/, a = { method: h[0].match(b) ? h[0].split(":")[0] : "attr", property: h.shift().replace(b, "") }, f = "ig", e = new RegExp(h.join("").replace(/^\s+|\s+$/g, ""), f); return e.test(jQuery(g)[a.method](a.property)) };

jQuery.extend({ Class: function() { }, Interface: function() { } });
jQuery.extend(jQuery.Interface.prototype, { attributes: [], properties: [], methods: [] });
jQuery.extend(jQuery.Class, { createGetSet: function(object, name, element) { object.prototype['get' + name] = function() { return this[element]; }; object.prototype['set' + name] = function() { this[element] = arguments[0]; }; if (!object.prototype[element]) { object.prototype[element] = ''; } },
    createGetSetRuntime: function(object, name, element) { object.constructor.prototype['get' + name] = function() { return this[element]; }; object.constructor.prototype['set' + name] = function() { this[element] = arguments[0]; }; if (!object.constructor.prototype[element]) { object.constructor.prototype[element] = ''; } },
    createNamespace: function(name) { var names = name.split('.'), namespaceStr = 'window'; while (names.length) { var name = names.shift(); namespaceStr += "['" + name + "']"; } return namespaceStr; },
    isIn: function(object, name) { for (var item in object.prototype) { if (item == name) { if (jQuery.isArray(object.prototype[item])) return 0; else if (jQuery.isFunction(object.prototype[item])) return 1; else if (jQuery.isEmptyObject(object.prototype[item]) || jQuery.isPlainObject(object.prototype[item])) return 2; else if (jQuery.isXMLDoc(object.prototype[item])) return 3; else return 0; } } return -1; },
    create: function() {
        var parent = null, elements = null, options = { abstract: false, getset: [], implements: [], module: '', superClass: [] };
        if (jQuery.isFunction(arguments[0])) { parent = arguments[0]; elements = arguments[1]; if (arguments[2]) { jQuery.extend(options, arguments[2] || {}); } }
        else { elements = arguments[0]; if (arguments[1]) { jQuery.extend(options, arguments[1] || {}); } }
        function handle() { if (this.options.abstract) { throw new Error("abstract classes cannot be instantiated"); } try { this.initialize.apply(this, arguments); } catch (ex) { } }
        jQuery.extend(handle.prototype, jQuery.Class);
        if (parent) { var superClass = parent.prototype.options.superClass || []; var superRender = parent.prototype.options.superRender || []; jQuery.extend(handle.prototype, parent.prototype); superClass.push(parent.prototype.initialize); options.superClass = superClass; try { superRender.push(parent.prototype.render); options.superRender = superRender; } catch (ex) { } }
        jQuery.extend(handle.prototype, elements || {}); handle.prototype.options = options; if (options.getset.length > 0) { for (var i = 0; i < options.getset.length; i++) { var name = options.getset[i][0], element = options.getset[i][1]; this.createGetSet(handle, name, element); } }
        if (options.implements.length > 0) {
            var attributesMustImplemented = [], propertiesMustImplemented = [], methodsMustImplemented = []; for (var i = 0; i < options.implements.length; i++) { jQuery.merge(attributesMustImplemented, options.implements[i].attributes); jQuery.merge(propertiesMustImplemented, options.implements[i].properties); jQuery.merge(methodsMustImplemented, options.implements[i].methods); }
            var didNotImplemented = false, msg = 'must be implemented';
            for (var i = 0; i < attributesMustImplemented.length; i++) { var result = this.isIn(handle, attributesMustImplemented[i]); if (result != 0 && result != 2) { didNotImplemented = true; msg = 'attribute: ' + attributesMustImplemented[i] + ', ' + msg; } }
            for (var i = 0; i < propertiesMustImplemented.length; i++) { var resultGet = this.isIn(handle, 'get' + propertiesMustImplemented[i]), resultSet = this.isIn(handle, 'set' + propertiesMustImplemented[i]); if (resultGet != 1) { didNotImplemented = true; msg = 'property: get' + propertiesMustImplemented[i] + ', ' + msg; } else if (resultSet != 1) { didNotImplemented = true; msg = 'property: set' + propertiesMustImplemented[i] + ', ' + msg; } }
            for (var i = 0; i < methodsMustImplemented.length; i++) { var result = this.isIn(handle, methodsMustImplemented[i]); if (result != 1) { didNotImplemented = true; msg = 'method: ' + methodsMustImplemented[i] + ', ' + msg; } } if (didNotImplemented) { throw new Error(msg); } 
        }
        if (options.module != '') { var names = options.module.split('.'), name = names[0]; window[name] = new function() { }; for (var i = 1; i < names.length; i++) { name += '.' + names[i]; eval(this.createNamespace(name) + ' = new function() {};'); } eval('jQuery.extend(' + this.createNamespace(name) + ', handle.prototype);'); } return handle;
    },
    addMethods: function() { if (arguments[0]) { jQuery.extend(this.constructor.prototype, arguments[0]); } }, addAttributes: function() { if (arguments[0]) { jQuery.extend(this.constructor.prototype, arguments[0]); } },
    addProperty: function() { try { var name = arguments[0], element = arguments[1]; this.createGetSetRuntime(this, name, element); } catch (ex) { } },
    property: function() { if (arguments.length == 1 && this.constructor.prototype.hasOwnProperty('get' + arguments[0])) { if (arguments[0]) { if (jQuery.isFunction(this['get' + arguments[0]])) { return this['get' + arguments[0]](); } else { return this['get' + arguments[0]]; } } } else if (this.constructor.prototype.hasOwnProperty('set' + arguments[0])) { if (jQuery.isFunction(this['set' + arguments[0]])) { for (var name in this) { if (this[name] == this['get' + arguments[0]]()) { if (!jQuery.isFunction(this[name])) { this[name] = arguments[1]; } } } return this['get' + arguments[0]](); } else { this[arguments[0]] = arguments[1]; return this['get' + arguments[0]]; } } },
    equal: function() { if (arguments[1]) { return arguments[0].constructor.prototype == arguments[1].constructor.prototype; } else { return this.constructor.prototype == arguments[0].constructor.prototype; } },
    clone: function() { function handle() { try { this.initialize.apply(this, arguments); } catch (ex) { } } if (arguments[0] == true) { jQuery.extend(handle.prototype, this.constructor.prototype); return handle; } else { jQuery.extend(handle.constructor.prototype, this.constructor.prototype); return handle; } },
    toString: function() { return 'Design By Hassan Jodat Shandi'; },
    parent: function() { var method = arguments[0], args = arguments[1], superClass = this.options.superClass, index = -1; for (var i = 0; i < superClass.length; i++) { if (superClass[i] == method) index = i; } if (index == -1 && superClass[superClass.length - 1] != method) { superClass[superClass.length - 1].apply(this, args); } else { superClass[index - 1].apply(this, args); } } 
});

var WiSSClient = { Version: "0.1", HeightOffset: 0, require: function(a) { document.write('<script type="text/javascript" src="' + a + '"><\/script>') }, load: function() { WiSSClient.Dialogs = []; jQuery(window).load(function() { WiSSClient.ScrollBarWidth = a(); WiSSClient.MakeSameSize() }); function a() { var e = document.createElement("p"); e.style.width = "100%"; e.style.height = "200px"; var f = document.createElement("div"); f.style.position = "absolute"; f.style.top = "0px"; f.style.left = "0px"; f.style.visibility = "hidden"; f.style.width = "200px"; f.style.height = "150px"; f.style.overflow = "hidden"; f.appendChild(e); document.body.appendChild(f); var d = e.offsetWidth; f.style.overflow = "scroll"; var c = e.offsetWidth; if (d == c) { c = f.clientWidth } document.body.removeChild(f); return (d - c) } var b = "wissclient(?:\\.js|\\.min\\.js)(\\?.*)?$"; jQuery("head script:regex(src," + b + ")").each(function() { b = /wissclient(?:\.js|\.min\.js)(\?.*)?$/; var c = this.src.replace(b, ""), d = this.src.match(/\?.*mode=dev/); if (d) { WiSSClient.mode = "dev" } else { WiSSClient.mode = "release" } WiSSClient.ScriptsRoot = c; document.write('<link href="' + c + 'css/base.css" rel="stylesheet" type="text/css" />'); includes = this.src.match(/\?.*load=([a-z,]*)/); includeArr = (includes ? includes[1] : "xslxml,jquery-ui-1.8.1.custom,foldingsidemenu,jquery.lightbox-0.5,twitterFeed").split(","); for (i = 0; i < includeArr.length; i++) { include = includeArr[i]; if (WiSSClient.mode == "dev") { WiSSClient.require(c + "lib/" + include + ".js") } else { WiSSClient.require(c + "lib/" + include + ".min.js") } } }) }, MakeSameSize: function() { fDvs = jQuery("div.makesamesize"); if (fDvs.length > 1) { maxHeight = 0; for (fdI = 0; fdI < fDvs.length; fdI++) { thisfDv = jQuery(fDvs[fdI]); if (fdI == 0) { maxHeight = thisfDv.height() } if (thisfDv.height() > maxHeight) { maxHeight = thisfDv.height() } } for (fdI = 0; fdI < fDvs.length; fdI++) { thisfDv = jQuery(fDvs[fdI]); thisfDv.css("min-height", maxHeight + "px") } } }, LastDialogZIndex: 100, ScrollBarWidth: 0, ScriptsRoot: "", mode: "release" }; WiSSClient.load();
