jQuery(document).ready(function(){ if(document.getElementById("HeaderMultiView"))
{ jQuery('#HeaderMultiView').ContentSlider({ leftBtn: W3FE_BASE_URL+"public/_images/lcs/gallery-prev-btn.png", rightBtn:W3FE_BASE_URL+"public/_images/lcs/gallery-next-btn.png", width:'930px',
height:'380px',
speed: 400,
easing:'easeOutQuad',
textResize: true});}});;jQuery(document).ready(function(){ var hashCode='';
jQuery('.blocksRedirect').each(function(){ if(jQuery(this).find('.url').attr('href')!=null){ jQuery(this).css({"cursor":"pointer"});}}); jQuery('.blocksRedirect').click(function(event)
{ event.preventDefault(); arrURL= jQuery(this).find('.url').attr('href');
if(jQuery(this).find('.url').attr('target')!=''&& arrURL!=null)
{ arrURL= arrURL.replace(W3FE_BASE_URL,''); arrURL= arrURL.split('/');
if(arrURL[1]!=''|| arrURL[1]!='#'){ if(arrURL[1].charAt(0)=='#'){ event.preventDefault(); jQuery('.gall_item_block').each(function(){ hashCode= jQuery(this).val(); if(hashCode== arrURL[1]){ jQuery(this).parent('div').slideDown(400,function(){ jQuery(this).removeClass('hidden');});}});}
else
{
if(jQuery(this).find('.url').attr('target')=='_blank')
window.open(jQuery(this).find('.url').attr('href')); else
window.location= jQuery(this).find('.url').attr('href');}}}});});; jQuery(".mtpl1").hover(function(){
jQuery(this).addClass("blue_bg");},function()
{
jQuery(this).removeClass("blue_bg");});; jQuery(".mtpl3").hover(function(){
jQuery(this).css({"cursor":"pointer"});
jQuery(this).find("h2").css({"color":"#009dde"});
jQuery(this).find("p").css({"color":"#666"});},function()
{
jQuery(this).find("h2").css({"color":"#0d2043"});
jQuery(this).find("p").css({"color":"#8290a2"});});;jQuery.fn.populate= function(obj, options){
function parseJSON(obj, path)
{
path= path||'';
if(obj== undefined)
{}
else if(obj.constructor== Object)
{ for(var prop in obj)
{ var name= path+(path==''? prop:'['+prop+']'); parseJSON(obj[prop], name);}}
else if(obj.constructor== Array)
{ for(var i= 0; i< obj.length; i++)
{ var index= options.useIndices? i:''; index= options.phpNaming?'['+index+']': index; var name= path+ index; parseJSON(obj[i], name);}}
else
{
if(arr[path]== undefined)
{ arr[path]= obj;}
else if(arr[path].constructor!= Array)
{ arr[path]=[arr[path], obj];}
else
{ arr[path].push(obj);}}};
function debug(str)
{ if(window.console&& console.log)
{ console.log(str);}}
function getElementName(name)
{ if(!options.phpNaming)
{ name= name.replace(/\[\]$/,'');}
return name;}
function populateElement(parentElement, name, value)
{ var selector= options.identifier=='id'?'#'+ name:'['+options.identifier+'="'+name+'"]'; var element= jQuery(selector, parentElement); value= value.toString(); value= value=='null'?'': value;
element.html(value);}
function populateFormElement(form, name, value)
{
var name= getElementName(name);
var element= form[name]; if(element== undefined)
{ debug('No such element as '+ name); return false;}
if(options.debug)
{ _populate.elements.push(element);}
elements= element.type== undefined&& element.length? element:[element];
var radioElementLabel='';
for(var e= 0; e< elements.length; e++)
{
var element= elements[e];
switch(element.type|| element.tagName)
{
case'radio':
element.checked=(element.value!=''&& value.toString().toLowerCase()== element.value.toLowerCase()); if(options.stylepopulate)
{ if((radioElementLabel!=jQuery("#"+element.id).parent().parent().prev().find("strong").html())&& radioElementLabel=='')
{
radioElementLabel= jQuery(strSubmittedContactFormId+" #"+element.id).parent().parent().prev().find("strong").html(); jQuery(".errorbox").html(jQuery(".errorbox").html()+'<span>'+html_entity_decode(value)+" "+radioElementLabel+'</span>');}}
else
{
if(element.checked==true)
jQuery("#"+element.id).parent().addClass('jNiceRadioChecked');}
case'checkbox':
var values= value.constructor== Array? value:[value]; for(var j= 0; j< values.length; j++)
{ element.checked|= element.value== values[j];}
break;
case'select-multiple': var values= value.constructor== Array? value:[value]; for(var i= 0; i< element.options.length; i++)
{ for(var j= 0; j< values.length; j++)
{ element.options[i].selected|= element.options[i].value== values[j];}}
break;
case'select': case'select-one': element.value= value.toString().toLowerCase()|| value; break;
case'text': case'button': case'textarea': case'submit': default: value= value== null?'': value;
if(options.stylepopulate)
{
finalValue= element.value.substr(0,(element.value.length-1));
jQuery(".errorbox").html(jQuery(".errorbox").html()+'<span>'+finalValue+" "+html_entity_decode(value)+'</span>');
element.style.backgroundColor= options.stylepopulatecolor;}
else
element.value= html_entity_decode(value);}}}
if(obj=== undefined)
{ return this;};
var options= jQuery.extend
({ phpNaming: true, phpIndices: false, resetForm: true, identifier:'id', debug: false, stylepopulate: false, stylepopulatecolor:"#FF0000"}, options);
if(options.phpIndices)
{ options.phpNaming= true;}
var arr=[]; parseJSON(obj);
if(options.debug)
{ _populate={ arr: arr, obj: obj, elements:[], stylepopulate: false, stylepopulatecolor:"#FF0000"}}
this.each
( function()
{
var tagName= this.tagName.toLowerCase(); var method= tagName=='form'? populateFormElement: populateElement;
if(tagName=='form'&& options.resetForm)
{ this.reset();}
for(var i in arr)
{ method(this, i, arr[i]);}});
return this;};
function html_entity_decode(str)
{ try
{ var tarea=document.createElement('textarea'); tarea.innerHTML= str; return tarea.value; tarea.parentNode.removeChild(tarea);}
catch(e)
{
document.getElementById("htmlconverter").innerHTML='<textarea id="innerConverter">'+ str+'</textarea>'; var content= document.getElementById("innerConverter").value; document.getElementById("htmlconverter").innerHTML=""; return content;}};jQuery(document).ready(function(){ if(jsonErrorArray!='')
{ var myObjectJsonValuesArray= eval('('+ jsonValuesArray+')');
intSubmittedContactFormNodeId= myObjectJsonValuesArray.contactFormsSubmit; var result= eval('({"JSONError":'+jsonErrorArray+'})');
strSubmittedContactFormId="#formname_"+intSubmittedContactFormNodeId; strSubmittedContactFormErrorContainer="#formname_"+intSubmittedContactFormNodeId+" .error_consolidated";
jQuery(strSubmittedContactFormErrorContainer).css({"display":"block"});
jQuery(strSubmittedContactFormId).populate(result.JSONError,{stylepopulate: true,stylepopulatecolor:"#F6B7BA"});}
if(jsonValuesArray!='')
{ var result= eval('({"JSONForm":'+jsonValuesArray+'})'); jQuery(strSubmittedContactFormId).populate(result.JSONForm);}
jQuery(".contact_form").jNice();
jQuery("input.upload_file").filestyle({
image: W3FE_BASE_URL+"/public/_images/lcs/browse_button.png", imageheight: 20, imagewidth: 74, width: 315});
globalTextValue='';
jQuery(".jNiceInput").focus(function()
{ globalTextValue= jQuery(this).val();
jQuery(this).val('');});
jQuery(".jNiceInput").blur(function()
{
if(jQuery(this).val()== globalTextValue)
jQuery(this).val(globalTextValue); else if(jQuery(this).val()=='')
{ jQuery(this).val(jQuery(this).attr('title'));}});
jQuery(".contact_submit").focus(function()
{ jQuery(this).blur();});
jQuery(".jNiceSelectWrapper").css({'width':'216px'}); jQuery(".jNiceSelectText").css({'width':'192px'});});;
(function($){
$.fn.filestyle= function(options){
var settings={ width: 250};
if(options){ $.extend(settings, options);};
return this.each(function(){
var self= this; var wrapper= $("<div>").css({"width": settings.imagewidth+"px","height": settings.imageheight+"px","background":"url("+ settings.image+") 0 0 no-repeat","background-position":"right","display":"inline","position":"absolute","overflow":"hidden","top":14+"px","right":0+"px","border":"1px solid #C6C6C6"});
var filename= $('<input class="file">').addClass($(self).attr("class")).css({"display":"inline","width": settings.width+"px"}); $(self).before(filename); $(self).wrap(wrapper); $(self).css({"position":"relative","height": settings.imageheight+"px","width": settings.width+"px","display":"inline","cursor":"pointer","opacity":"0.0"}); if($.browser.mozilla){ if(/Win/.test(navigator.platform)){ $(self).css("margin-left","-90px");} else{ $(self).css("margin-left","-135px");};} else{ $(self).css("margin-left", settings.imagewidth- settings.width+"px");}; $(self).bind("change", function(){ filename.val($(self).val());});});};})(jQuery);
