jQuery.jCore={url:{genPathFromString:function(a){a=a.replace(/(<([^>]+)>)/ig,"");a=a.replace(" ","-");return a=a.replace(/([^a-z^0-9^_^-]*)/ig,"")}},tooltip:{display:function(a,c){jQuery.loading(false);c==true?jQuery.loading(true,{html:a,text:"",max:5E3}):jQuery.loading(true,{text:a,max:5E3})}},form:{INPUT_TYPE_TEXT:1,INPUT_TYPE_EMAIL:2,INPUT_TYPE_FILE:12,appendEntryTo:function(a,c,b,e,h,f,g){if(a==undefined)return false;html="";html+="<div class='form-entry form-entry-"+jQuery.jCore.url.genPathFromString(b)+
"'><div class='form-entry-title'>"+c+"</div><div class='form-entry-content'>";html+=e==this.INPUT_TYPE_TEXT||e==this.INPUT_TYPE_EMAIL?"<input type='text' name='"+b+"' class='text-entry' value='"+f+"' "+g+"/> ":e==this.INPUT_TYPE_FILE?"<input type='file' name='"+b+"' class='file-entry' value='"+f+"' "+g+"/> ":"This type is not supported yet! ";html+="<a href='javascript://' class='remove-link' onclick=\"jQuery.jCore.form.removeEntry(this);\">Remove</a></div></div>";jQuery(a).append(html);return true},
removeEntry:function(a){if(a==undefined)return false;jQuery(a).closest(".form-entry").remove();return true}},modules:{}};
jQuery.fn.extend({jCore:function(){return this.each(function(){typeof jQuery.loading!="undefined"&&jQuery.loading({onAjax:true,delay:1E3});typeof jQuery(this).fcToggle!="undefined"&&jQuery(this).find(".fc-title").fcToggle();typeof jQuery(this).mailme!="undefined"&&jQuery(this).find(".mailme").mailme();typeof jQuery(this).rating!="undefined"&&jQuery(this).find(".star-rating").rating({split:2,callback:function(){if(jQuery(this).attr("href")){jQuery(this).ajaxLink();jQuery(this).click();return false}}});
if(typeof jQuery(this).corner!="undefined"){jQuery(this).find(".rounded-corners-top").corner("top 5px");jQuery(this).find(".rounded-corners-bottom").corner("bottom 5px");jQuery(this).find(".rounded-corners").corner("5px")}typeof jQuery(this).dropDownMenu!="undefined"&&jQuery(this).find("#main-menu .menu").dropDownMenu();if(JCORE_VERSION=="undefined"||JCORE_VERSION<"0.6"){jQuery(this).find(".list tbody tr").mouseenter(function(){jQuery(this).addClass("hilight")});jQuery(this).find(".list tbody tr").mouseleave(function(){jQuery(this).removeClass("hilight")})}jQuery(this).find(".confirm-link").click(function(){return confirm("Please confirm your action: "+
jQuery(this).attr("title")+"?!")});typeof jQuery(this).ajaxLink!="undefined"&&jQuery(this).find(".ajax-link").ajaxLink();typeof jQuery(this).ajaxDownloadLink!="undefined"&&jQuery(this).find(".ajax-download-link").ajaxDownloadLink();typeof jQuery(this).ajaxForm!="undefined"&&jQuery(this).find("form.ajax-form").ajaxForm();typeof jQuery(this).ajaxContentLink!="undefined"&&jQuery(this).find(".ajax-content-link").ajaxContentLink();typeof jQuery(this).ajaxLightboxLink!="undefined"&&jQuery(this).find(".ajax-lightbox-link").ajaxLightboxLink();
typeof jQuery(this).ajaxPaging!="undefined"&&jQuery(this).find(".paging-ajax a").ajaxPaging();jQuery(this).find(".checkbox-all").click(function(){var a=this.checked;jQuery(this).parents("form").find("input[type=checkbox]").each(function(){this.checked=a})});typeof jQuery(this).datepicker!="undefined"&&jQuery(this).find(".calendar-input").each(function(){if(jQuery(this).is(".timestamp")){d=new Date;dateformat="yy-mm-dd "+d.getHours()+":"+d.getMinutes()+":00"}else dateformat="yy-mm-dd";jQuery(this).datepicker({dateFormat:dateformat}).after(jQuery("<a class='clear-calendar-input'>&nbsp;</a>").click(function(){jQuery(this).parent().find("input").val("");
return false})).after(jQuery("<a class='show-calendar-input'>&nbsp;</a>").click(function(){jQuery(this).parent().find("input").focus();return false}))});typeof jQuery(this).ColorPicker!="undefined"&&jQuery(this).find(".color-input").each(function(){jQuery(this).ColorPicker({onBeforeShow:function(){$(this).ColorPickerSetColor(this.value)}}).after(jQuery("<a class='clear-color-input'>&nbsp;</a>").click(function(){jQuery(this).parent().find("input").val("");return false})).after(jQuery("<a class='show-color-input'>&nbsp;</a>").click(function(){jQuery(this).parent().find("input").focus();
return false}))});typeof jQuery(this).lightBox!="undefined"&&jQuery(function(){var a=[];jQuery("a[rel^=lightbox]").each(function(){jQuery.inArray(jQuery(this).attr("rel"),a)&&a.push(jQuery(this).attr("rel"))});jQuery(a).each(function(c,b){jQuery("a[rel="+b+"]").lightBox()})});typeof jQuery(this).lightBox!="undefined"&&jQuery(function(){var a=[];jQuery("a[rel^=videolightbox]").each(function(){jQuery.inArray(jQuery(this).attr("rel"),a)&&a.push(jQuery(this).attr("rel"))});jQuery(a).each(function(c,b){jQuery("a[rel="+
b+"]").lightBox({disableSlideShow:true,disableDownload:true,ajaxContent:true,fixedNavigation:true,txtImage:"Video"})})});typeof jQuery(this).qtip!="undefined"&&jQuery(this).find(".qtip").qtip({style:{name:"cream",tip:true},position:{adjust:{screen:true}}});if(typeof jQuery(this).tipsy!="undefined"){jQuery(this).find(".list td[title]").tipsy({delayIn:100,html:true,gravity:"w"});jQuery(this).find(".tipsy,.list a[title],.admin-section-item [title],.button[title],.attachment [title],.star-rating [title],.comment-rating-up,.comment-rating-down").tipsy({delayIn:100,
html:true});jQuery(this).find(".calendar-input[title],.timestamp[title],.color-input[title]").tipsy({trigger:"focus",gravity:"w",offset:50});jQuery(this).find("input[type=file][title]").tipsy({delayIn:100,trigger:"hover",gravity:"w"});jQuery(this).find("input[title],textarea[title],select[title]").tipsy({trigger:"focus",gravity:"w"})}typeof jQuery(this).tabby!="undefined"&&jQuery(this).find("textarea.code-editor").tabby();typeof jQuery(this).keypad!="undefined"&&jQuery(this).find('input[type="password"]').keypad({keypadOnly:false,
layout:$.keypad.qwertyLayout})})}});
